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??