Restrict user to stop resolving the incident when priority is Critical/High
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:11 AM
Hi Team,
I'm Trying to stop user resolving the incident which contains priority is P1/P2
Below I'm running the Before BR but its allowing the users to resolve the incident.
1)When to Run
2)Script:
let me if any error in my code. only "Major incident management" group allow to resolve the priory P1/P2 incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:20 AM
In your code at line number 3, you need to modify it as below:
if(gs.getUser().isMemberOf('Major Incident Management')==false). This should solve the issue.
Please mark this as correct and helpful, if it solved your issue.
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:40 AM
Hi Mohit,
Thank for the update.
However, when user submit the Incidnet.
Can we Cleary the "Activates" which are being updated in the incident form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 06:42 AM
I could not understand what you are asking here. Could you pls explain the line: "Can we Cleary the "Activates" which are being updated in the incident form?"
Mohit Kaushik
ServiceNow MVP (2023-2025)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:21 AM
Hi @bankuru bhargav ,
Try using below script :
if(!gs.getUser().isMemberOf(' Group sys_id')){
gs.addErrorMessage(‘Your message here’);
current.setAbortAction();
}