show cancelled incident state only for a process specialist team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 02:56 AM
how to hide a 'cancelled' incident state option for all other users and show it only for a process specialist team in incident form, i have written a display business rule and a onload client script but whats happening is that when i impersonate process team i can see cancelled option and when i cancel the incident by impersonating process team incident is getting cancelled but when i end inmpersonation incident state is setting to active again
business rule :
if(g_scratchpad.belongs_to_groups != 'true')
{
g_form.removeOption('incident_state','15');
}}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 03:04 AM
Hi @raj765_32
Instead of incident_state, shouldn't you be hiding state field option
g_form.removeOption('state','15');
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 03:05 AM
there is no state field either there is incident state field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 03:12 AM
I am not sure if you have customized the solution here but state should be there, it is task field.
And when you say the state is active again, what does it mean, do you have active state?
When incident has already been canceled, shouldn't it reflect on the form, it should not be available for selection for other users, right
if(g_scratchpad.belongs_to_groups != 'true' && g_form.getValue("incident_state") != "15")
{
g_form.removeOption('incident_state','15');
}
}
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 03:15 AM
there is no state field either there is incident state field in incident form, i mean to say that when i impersonated the process team and cancelled the incident, incident is getting cancelled but when i end the impersonation the same incident is showing as active again