The following script works on an Acroform as a folder level .js file, with an additional .js file to create Menu item to call the function (MyTrustedSpecialTaskFunc1), and using Acrobat Pro or Standard (not Reader)...
My question is, how would I convert this for use with a LiveCycle designed form...I have played around with it, but I seem to be missing some key step...
------------------------
/* saveAs Script */
mySaveAs = app.trustPropagatorFunction( function ( doc, path )
{
app.beginPriv();
return retn = doc.saveAs(path);
app.endPriv();
});
myTrustedSpecialTaskFunc1 = app.trustedFunction( function ( doc, path )
{
app.beginPriv();
var a = this.getField("NextPONumber");
var av = a.value;
var g = "/c/hrarchive/" + av + ".pdf"
var retn = mySaveAs(this, g);
app.endPriv();
return retn;
});
-------------------------------
Menu item script:
app.addMenuItem({ cName: "Submit Package to HR Archive", cParent: "Help", cExec: "myTrustedSpecialTaskFunc1()", nPos: 0});
--------------------------------
the field in the Designer form is: "form1.header.NextPONumber"...Thanks in advance...