syed_faheem
ServiceNow Employee

Hi Sriddhar


I added dynamically generated Letter ID to the letter by adding following code to _getDocTempleInfo function in script include. Just added these lines.




    this.footnote= gr.template.footnote + ''; // existing line
    // add document number
    var gdt = new GlideDateTime();
    this.letterid=gdt.getNumericValue();
    this.fileName = current.number+'-'+gdt.getNumericValue();
    this.footnoteleft = this.letterid + ' '+gdt.getDisplayValue() ;
    var n=100-(this.footnoteleft.length+this.footnote.length);
    this.footnote=this.footnoteleft + repeat(' ',n)+ this.footnote;
   
    this.headerPosition = gr.template.header_position + ''; // existing line



Cheers


Syed