How to auto-change Incident state from On Hold to In Progress on reassignment and make Work Notes ma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago - last edited 4 hours ago
Hi @nameisnani
You can use a combination of a Before-Update Business Rule and a UI Policy for your requirement.
1: Create the Business Rule (Auto-Update State)
- Navigate to: System Definition > Business Rules and click New.
- Name: Auto-update to In Progress on Reassignment
- Table: Incident
- When: Before
- Update: Checked
- Condition Tab: State is On Hold AND [Assignment group changes OR Assigned to changes]
(function executeRule(current, previous /*null when async*/) {
current.state = 2; // Set State to In Progress
})(current, previous);
2.Create an onChange Client Script
- Navigate to System Definition > Client Scripts and click New
- Fill in the following fields:
- Name: Make Work Notes Mandatory on Assignment Change
- Table: incident
- Type: onChange
- Field name: assignment_group
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '' || oldValue === newValue) {
return;
}
g_form.setMandatory('work_notes', true);
}
3: Create a onChange Client Script for "Assigned to"
- Name: Make Work Notes Mandatory on Assignee Change
- Table: incident
- Type: onChange
- Field name: assigned_to
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '' || oldValue === newValue) {
return;
}
g_form.setMandatory('work_notes', true);
}
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @nameisnani
My Bad. Updated solution. check it. Use onChange client script.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @nameisnani
In the client script , add a IF condition when old value not equal to new value , then set Work notes mandatory. do it for the both the script and share the result.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti