9 Replies Latest reply on Jun 30, 2015 2:34 AM by Test Screen Name

    Javascript fails but does not open console or give an error.

    JeffBPaarsa Level 1



      Here is the code I want to execute by click of a button inside of a document.


      //  Save the assesment
      var mySaveAs = app.trustedFunction( function(oDoc,cPath,cFlName,cpri)
         app.beginPriv(); // Ensure path has trailing "/" cPath = cPath.replace(/([^\/])$/, "$1/");
         try {oDoc.saveAs(cPath +cFlName +cpri);}
      var cPath = "/C/SharedDir/Dropbox/Processed/ZTrash/";     // set the saving paths
      var cPtName = "(" + this.getField("LName").value + ", " + this.getField("FName").value + this.getField("Today_Date").value + ").pdf";
      cPtName = cPtName.replace(/([^\/])$/, "$1/");
      mySaveAs(this,cPath, this.documentFileName.split('.')[0],cPtName);



      mySaveAs Functrion does not run or if it runs does not open the Java Console or give an error. 


      My eyes can't catch anything wrong with it does your catch wrongful piece of code?



      Jeff P.