These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Export Data as XML

krm240
Registered: Apr 17 2009
Posts: 95

I am really stumped here - any assistance would be greatly appreciated.
Using Livecycle Designer2, Adobe Pro, and a trusted function
I am trying to Export the form data into XML format to a specific directory and file name allowing import into Excel or a database.

The button click event is as follows:
var FName = "TestExportData1.xml";
var FPath = "/c/Users/Public/Temp/";
myExportXML(event.target, FPath, FName) ;

The Trusted Function is as follows:
var myExportXML = app.trustedFunction(
function(oDoc,cPath,cName){
app.beginPriv();
oDoc.xfa.host.exportData(cPath + cName,0); // when path included fails
app.endPriv();
});

The function does work with
oDoc.xfa.host.exportData("",0);
But as soon as I add the file path and name it crashes
error message:
NotAllowedError: Security settings prevent access to this property or method.
Doc.exportXFAData:-1:XFA:form1[0]:#subform[0]:Button2[7]:click

Have tried this.exportAsXFDF with out success too.

The path does exist, (a saveas trusted function saves to this directory)
I have been told one can do this as a trusted function.
Is this possible??

My Product Information:
LiveCycle Designer, Windows
krm240
Registered: Apr 17 2009
Posts: 95
Looking more into this issue looks like even a trusted function may not work. Anyone know if it does? See some posts that says a call from a VB script may work. If so, anyone have any ideas on how to do this?