How do we select the standard change template from Flow designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2019 09:35 PM
How do we select the standard change template from Flow designer? When I select action as Standard change request it says it will take the template associated to Catalog. Seems like its not working.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:02 AM
The below worked for me.
I provided an incorrect template name earlier that is the reason, the standard change that was created was empty.
The associated tasks in the standard template didn't show up as I missed to add the version before the applyTemplate(). Once done it worked like charm.
(function execute(inputs, outputs) {
// ... code ...
var change = new GlideRecord("change_request");
change.initialize();
//Change version should be mentioned to add the pre-defined tasks associated with the standard change
change.std_change_producer_version = "e8f8b2bc1b93a450cfaaabbb999cccde";
change.applyTemplate("My Standard Template Name");
change.type = 'standard';
change.insert();
// outputs.change_number = change.number
outputs.change_ref = change
})(inputs, outputs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2020 09:38 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2021 12:43 AM
I don't know if still interested, is an old topic, but for future people searching the same, I think this other community entry can be useful to select the template in flow designer without the custom script: https://community.servicenow.com/community?id=community_question&sys_id=0a337b7cdb2aa410ab0202d5ca96...
In his answer, Kieran sais he use two actions, first action to lookup the required change template from the Change Template Version table, and a secondary action to create a change request using that record.
Hope that helps