STD CHANGE TEMPLATE modification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I trust this message finds you well.
i have several (300) std change templates related to patching within a specific category.
we are starting to use the scheduled maintenance field within the change form and i need to modify all templates. usually, when a std change templated is modified goes through an approval process prior to be re-published.
the million dollar question is....is there a way to bulk updating all 300 std change templates without going through the approval process? or at least modifying them in bulk?
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @El Cuchi ,
you can run a Background Script to update all 300 templates directly without triggering the approval flow.
in your script you can use the
1) gr.setUseEngines(false) :- a ServiceNow GlideRecord API method used in server-side scripts to temporarily disable internal processing engines, preventing workflows, business rules, data policies, email notifications, and assignment rules from firing for a specific GlideRecord action (insert, update, delete), allowing developers to bypass standard logic for bulk data operations or specific automation tasks.
2)gr.setWorkflow(false) :-= is a ServiceNow JavaScript command used with GlideRecord (gr) to disable the automatic triggering of Business Rules, Workflows, and Flows during a scripted database operation (like insert or update), improving performance and allowing for customized updates without side effects, though it must be used cautiously as it bypasses core automation and can affect auditing/notifications
If you found my solution helpful, please mark it as Helpful or Accepted Solution...!
thanks,
tejas
Email: adhalraotejas1018@gmail.com
LinkedIn: https://www.linkedin.com/in/tejas1018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
thanks for taking the time to respond to my issue.
i forgot to mention that none of the templates have the 'maintenance schedule' field within the template, so i need to add it to the template as well as the value. Also, template fields are not sored the usual way, they are stored all fields in one called template.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @El Cuchi ,
in sys_template table all the change templates are stored as JSON format you can write the background script to update the Template JSON.
If you found my solution helpful, please mark it as Helpful or Accepted Solution...!
thanks,
tejas
Email: adhalraotejas1018@gmail.com
LinkedIn: https://www.linkedin.com/in/tejas1018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @El Cuchi
In ServiceNow, standard change templates are designed to follow the approval workflow when modified, so any change usually triggers an approval process before being published.
Unfortunately, there is no out-of-the-box way to bulk update standard change templates and bypass approvals safely. Every template change is subject to the approval workflow.
Possible approaches
Use a script to update templates programmatically
A scoped script or background script can update fields (like Scheduled Maintenance) on multiple templates at once.
You can run it as an admin user.
This will bypass the normal UI approval process because it updates the records directly in the database.
Caution: Ensure proper testing in DEV / UAT before running in PROD.
Update templates manually in batches
Smaller batches can be edited and published normally, but it will trigger approvals.
Change workflow temporarily (not recommended)
Some organizations temporarily disable approvals for specific updates, but this is risky and may violate change management policies.
Recommendation:
Use a background script in DEV/UAT to update the scheduled maintenance field for all templates, then move the changes to PROD after testing.
This is the safest way to bulk update without going through individual approvals.
If this response proves useful, please mark it as Accept as Solution and Helpful. Doing so benefits both the community and me. 👍🙂
