State Flow Requirement on Incident Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2025 09:30 AM
Hi experts,
I have a requirement related to the state flow on the incident form and would appreciate your guidance.
- When the incident form is opened, the only available state option should be "New".
- After submitting the form, the state should allow selecting one of the following three options: "In Progress", "On Hold", or "Cancelled".
- If the state is changed to "In Progress", the available state options should update to "Resolved", "On Hold", or "Cancelled".
- Once the state is set to "Resolved", the only available state option should be "Closed".
Could you please advise on how to implement this state flow using Business Rules, UI Policies, or Client Scripts?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2025 09:53 AM
Hello @Gulfam Shafee3
You can utilize State Model module which is available under state management application menu as showed below.
Do refer this overs docs - https://www.servicenow.com/docs/csh?topicname=prm-create-state-model-transition.html&version=latest
or check out this video - https://youtu.be/NRoMGusIHYA?si=UBpnSOLufvt-crK-
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 06:28 AM
Hello @Gulfam Shafee3
Thank you for marking my response as helpful! 😊
I hope your concern has been fully addressed. If it resolves your issue, please consider marking it as the accepted solution. This will ensure others in the community can benefit from the solution too.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2025 10:13 AM
@Gulfam Shafee3 Based on your use case, I assume its on the "State" field. If so, you may use client script to display the choices.
Using an onChange client script on "Incident" table for state field and considering if its a new record or not.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading && g_form.isNewRecord()) {
g_form.removeOption('state', 2);
g_form.removeOption('state', 3);
g_form.removeOption('state', 6);
g_form.removeOption('state', 7);
g_form.removeOption('state', 8);
}
if (newValue == 2 && !g_form.isNewRecord()) {
g_form.removeOption('state', 1);
g_form.removeOption('state', 7);
}
else if(newValue == 6){
g_form.removeOption('state', 1);
g_form.removeOption('state', 2);
g_form.removeOption('state', 3);
g_form.removeOption('state', 8);
}
}
When the incident form is opened, the only available state option should be "New".
If the state is changed to "In Progress", the available state options should update to "Resolved", "On Hold", or "Cancelled".
Once the state is set to "Resolved", the only available state option should be "Closed".
Note: Modify the script accordingly if required.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2025 10:31 AM
Hi @Gulfam Shafee3 ,
I have achieved it at my end.
Navigate to State Management -> State Models to create the new State Model. You can create as below screenshot which is working fine at my end.
Please note that state mentioned in the Enter Condition are OOTB.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Neha Pateria