You can create document file from servicenow and by script
var gr=new GlideRecord('sc_req_item'); gr.get('sys_id_of_record'); var gsa = new GlideSysAttachment(); var attachmentId = gsa.write(gr, "TestSample.doc", 'text/plain', <input html code>);
Then how to generate html code you can folow our another code:
https://snowexpertrohit.com/quick-code/itsm-code/create-pdf-automatically-from-the-script/
One response
what should be entered in the ?? code is not working plz update on this