- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 06:06 PM
Hello everyone,
I am trying to create a standard change request by using the script below:
var change = new GlideRecord("change_request");
change.initialize();
change.type = 'standard';
change.std_change_producer_version = '<sys_id of std template version>';
change.applyTemplate("Test Template");
change.insert();
gs.print('Change ' + change.number + ' created.');
Instead of creating a standard change, it is creating a Normal change. Help me with the script.
Thanks,
Bharath
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 07:19 PM
Are you using Change Models? if so, you will likely need to set that field too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 06:46 PM
Hello,
Please find the script in the below article for the same:-
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 06:52 PM
Thanks for checking this post. I have tried the script and a normal change was created for the same instead of standard.
Thanks,
Bharath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 07:19 PM
Are you using Change Models? if so, you will likely need to set that field too.