Default “Planned Outage” when creating Outage from Change Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Community,
We have a requirement related to Outage creation from Change Request.
Requirement:
When an Outage record is created from a Change Request, the Type field should default to "Planned Outage".
Current Behavior:
When creating an outage from a Change, the Type field is blank and users have to manually select the value.
Expected Behavior:
If the outage is created from a Change Request, the Type field should automatically default to "Planned Outage".
This should not affect outages created independently or from Incidents.
Ask:
What is the recommended and upgrade-safe way to achieve this?
Any guidance or best practice suggestions would be appreciated.
please provide configuration steps for this .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
You can use an onLoad client script, but I would not recommend doing that. The reason is that ServiceNow already provides the Open in new selection option, and the same module can be used by Incident as well.
Because of this, you might miss out or run into issues if the type is changed later. It’s better to think through this carefully rather than applying a simple onLoad script as a solution.
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/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
48m ago
you can use onLoad client script on cmdb_ci_outage table and seeif the task number is CHG or INC
function onLoad() {
var url = top.location.href;
// check if new record and record is being created from related list
if (g_form.isNewRecord() && url.indexOf('sysparm_collection_related_relationship') > -1) {
var task = g_form.getDisplayBox('task_number').value.toString();
if (task.startsWith('CHG')) {
g_form.setValue('type', 'planned');
}
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
