Utilize the Document Templates for RITMS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 04:33 AM
Hi All,
I have created a HTML document template which is a PDF. I would like to attach this template to the RITM whenever a particular form gets submitted.
Can anyone suggest how we can achieve this.
Thanks in Advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 04:48 AM
@Nagashree5 You can create an onBefore Insert business rule on RITM table and in condition builder apply a check of Item (cat_item) to only trigger when a particular catalog item is submitted.
In the script, you can use GlideAttachment API to copy the attachment to the target record. Please make the appropriate changes in the following script for the same.
var attachment = new GlideSysAttachment();
var incidentSysID = 'ab1b30031b04ec101363ff37dc4bcbfc';
var incGR = new GlideRecord('incident');
incGR.get(incidentSysID);
var copiedAttachments = attachment.copy('incident', incidentSysID, 'problem', incGR.getValue('problem_id'));
gs.info('Copied attachments: ' + copiedAttachments);
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 04:44 AM
Hi @Sandeep Rajput,
The document is not stored in the attachement table, it is in sn_doc_template table in the form of template written on the RITM table. Every time the template consumes the variable values of a RITM.
Please suggest.