logo

NJP

130. Generate Multiple Documents per Case

Import · Jun 11, 2024 · article

OOB on HR Cases, ServiceNow provides the functionality to generate PDF documents via document templates however this functionality allows the generation of only one document per case.

With a small tweak in a script include, we can generate multiple documents per case.

Script Include: HRSecurityUtilsAjax

Add the following code on line 43:

new sn_hr_core.GeneralHRForm(gr.sys_class_name, gr.sys_id, gr.sys_class_name, gr.sys_id).inactivateRelatedDrafts();

Screenshot of the new code:

View original source

https://medium.com/@LearnITbyPrashant/130-generate-multiple-documents-per-case-441b8841d405?source=rss-d005fc598f0a------2