Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all articles
Browse latest Browse all 16286

Trusted Function "Save As"

$
0
0

I've created the following .js file in the "C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Javascripts" folder on my pc.

 

File name "MySaveAsPO.js"

 

//script text as follows

 

/* saveAsPO Script */

 

mySaveAsPO = app.trustPropagatorFunction( function ( myDoc, path )
{
app.beginPriv();
var myDoc = event.target;
return retn = myDoc.saveAs(path);
app.endPriv();
});
myTrustedSpecialTaskFunc100 = app.trustedFunction( function ( myDoc, path )
{
app.beginPriv();


    var a = event.target.xfa.resolveNode("form1[0].header[0].NextPONumber[0]"); //copied ("form1[0].header[0].NextPONumber[0]") from an example
    var av = Date1.rawValue; //this is the name of the one of the fields I'd like to add to the save as file name although I'd like to use two fields.
    var g = "/s/AfterHoursLog/" + av + log".pdf" //the path I'm trying to save to is a shared drive "S:\AfterHoursLog"

    var retn = mySaveAsPO(myDoc, g);

   
app.endPriv();
return retn;
});

 

******************************

 

The script I have on the "save" button is as follows:

 

//calls trusted function in MySaveAsPO.js folder-level script

event.target.myTrustedSpecialTaskFunc100(event.target);

 

 


This is not working for me. What am I missing?  Should the .js file be saved to the Reader js folder as well seeing as end user will be using reader to complete the form?

 

Any help is greatly appreciated.

 

Thanks.

 

 


Viewing all articles
Browse latest Browse all 16286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>