Apply Standard Template for Change Request through Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2022 07:56 AM
Hi All,
I'm trying to create Standard Change Request through Pre-Approved Template. I'm using below script in workflow to create one, but its creating "Normal" Change request all other fields like Implement Plan, Justifications, Assignment Group, etc. are copied with same content mentioned in template. Only difference is Type of the change its inserted as "Normal"
var gr=new GlideRecord('change_request');
gr.Initialize();
gr.applyTemplate('standard_rfc');
gr.type='standard';
gr.insert();
//This is creating Normal Change
Kindly help to find the script through which I can submit a standard change through script.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 10:27 AM
Hi all,
I know this thread is a couple years at this point but I stumbled across it today and ended up finding a solution. Wanted to share in case anyone else runs into this. The first block is intended to find the latest version of the producer; this way the script will not need to be updated as new versions are published in the future. All you need in the sys_id of the std_change_record_producer