- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 2 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