Hi Syed,



I tried your solution, but I am getting the following error. Apparently, it doesn't know what the "repeat" is.




org.mozilla.javascript.EcmaError: "repeat" is not defined.


Caused by error in Script Include: 'QA_WO_PDF_Form' at line 136



==> 136: this.footnote=this.footnoteleft + repeat(' ',n)+ this.footnote;



Also, I noticed that "footnoteleft" and "letterid" variables are not present in GeneralForm, So I presume there is some supporting code to handle this in GeneralPDF or GeneralForm script includes ??


syed_faheem
ServiceNow Employee

Hi Sridhar


You will need to add below function to define repeat.



function repeat(str, num) {


                      var holder = [];


                      for(var i=0; i<num; i++) {


                                              holder.push(str);


                      }


                      return holder.join('');


}



Cheers


Syed


syed.faheem Do you have any plans to release an update set for document template table and script include ? If you already have can you share with us?



also, I assume your solution will work without HR plugin right as long as we have both table and script and PDF generator plugin activated ?  


syed_faheem
ServiceNow Employee

Hi srnewbie yes i have plans to release this on Share portal, just need to get some time to package this up.



Yes this solution would work without HR plug and you just need to enable PDF Generator Plugin. You just need to create table having same defination as HR Document Template table if you dont have HR plugin active.


stevejarman
Tera Guru

Hi Syed - have you made any progress getting this solution to work in Helsinki? The point at which it breaks appears to be within the GeneralPDF.attach function. I can't figure out why though.