- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 12:02 AM
Hi All,
I have a requirement to create a Standard Change Request when the "Create change request" button is clicked from a form with a specific Standard change template. Please help me here. Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 03:35 AM
try this
// Get the standard change template (producer version) record
var stdChange = new GlideRecord('std_change_producer_version');
if (stdChange.get('<sys_id_of_standard_change_producer_version>')) {
var chg = new GlideRecord('change_request');
chg.initialize();
chg.chg_model = stdChange.chg_model;
chg.type = 'standard';
chg.requested_by = '<sys_id_of_default_user>';
chg.std_change_producer_version = stdChange.sys_id;
chg.short_description = stdChange.short_description; // Manually set
chg.assignment_group = stdChange.assignment_group; // Manually set
chg.service = stdChange.service; // Manually set
chg.service_offering = stdChange.service_offering; // Manually set
// Set other fields as needed
var chg_id = chg.insert();
}
also check this link - response from GBall
Apply Standard Template for Change Request through Script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 12:33 AM
Please check the community link below:
If I this helps please mark it correct for future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 03:20 AM
Hi @PujaKar ,
Thank you for the reply, it is not about creating the template. We need to create Standard change request by using the existing standard change template which the user already created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 02:16 AM
You can create a standard change template from any change by using the “Propose Standard Change” button. This is out of the box (OOTB) functionality, so there is no need to create a custom UI for this.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 03:20 AM
Hi @Dr Atul G- LNG ,
Thank you for the reply, it is not about creating the template. We need to create Standard change request by using the existing standard change template which the user already created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 03:40 AM
The question is, how are you navigating to the Standard Change template? The best way is to either go to Create New and select the template, or go to All Templates → open the Standard Change templates related list. Then, you need to add a New button there to create a new template.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************