2 Replies Latest reply on Nov 18, 2011 2:36 AM by BarlaeDC

    Submitting attachment data via a form security issue

    mmelo@intelliware.ca Level 1



      Using the code outlined in the 'Javascript for Acrobat API reference' as a base I am attempting the following:


      var oParent = event.target;
      // Get the list of attachments:
      var oDataObjects = oParent.dataObjects;
      if (oDataObjects != null) {
      // Create the root node for the global submit:
      var oSubmitData = oParent.xfa.datasets.createNode("dataGroup","globalSubmitRootNode");
      // Iterate through all the attachments:
      var nChildren = oDataObjects.length;
      var addAttachmentsToXML = app.trustedFunction(function() {
                for (var iChild = 0; iChild < nChildren; i++) {
                          var oNextChild = oParent.openDataObject(oDataObjects[iChild].name);
                oParent.submitForm({cURL: "http://pod228:8180/QLMSourcing/form",cSubmitAs: "XML",oXML: oSubmitData});


      However when this code executes I get a" NotAllowedError: Security settings prevent access to this property or method." error. Originally, I did not wrap my code in a 'trustedFunction' and the exception thrown was specfically for the .openDataObject method on oParent.


      The question is: What specific permission(s) are required to enable this javascript to 'openDataObject's? We are using Adobe LiveCycle 7 with Reader Extensions. I've tried with the following permissions set:

      "Form.Export,Form.Fillin,Form.Import,Form.Add,Form.Delete,Form.SubmitStandAlone,Form.Spawn Template,

      Form.BarcodePlaintext,Document.Save,EF.Create,EF.Delete,EF.Modify,EF.Import,Annot.Create,A nnot.Modify,Annot.Copy,Annot.Import,Annot.Export" (essentially all of them).


      Any insight or direction would be great.


      Thank you.