- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2025 02:07 AM
Hello,
I have been assigned to task which is as follows: Once incident created in self-service portal, incident state should be in New state and by default it should go to Service Desk assignment group. User should be able to find only "In progress" & "Cancelled" state from the state field. Give the best approach to do this in servicenow.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2025 09:29 AM
I believe your incident will be created from a record producer since you are talking about portal.
In that record producer script you can set the group and INC will always be in New State
current.assignment_group = 'group sys id';
current.contact_type = 'self-service';
Then you can use onLoad client script on INC and see if the contact type is self-service then remove those options
function onLoad() {
if (g_form.getValue('contact_type') == 'self-service' && !g_form.isNewRecord()) {
g_form.removeOption('state', '2');
g_form.removeOption('state', '8');
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2025 08:14 AM
Hi @saikirangd9,
and where did you get stuck? share some error or explain what you did..
For the auto-assignment, check/create Assignment rule. And could you possibly explain what user should find what and where?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2025 08:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2025 09:29 AM
I believe your incident will be created from a record producer since you are talking about portal.
In that record producer script you can set the group and INC will always be in New State
current.assignment_group = 'group sys id';
current.contact_type = 'self-service';
Then you can use onLoad client script on INC and see if the contact type is self-service then remove those options
function onLoad() {
if (g_form.getValue('contact_type') == 'self-service' && !g_form.isNewRecord()) {
g_form.removeOption('state', '2');
g_form.removeOption('state', '8');
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏