Major incident Managment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 12:02 PM
I want to restrict the choices like cancel in the state field for major incident so, only admin or incident manager can cancel the major incident. other people can not cancel it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 01:09 PM
Hi @Prati2 ,
Please see this community post which refers to the same as you're searching for. Please find below client side script utilized in the post https://www.servicenow.com/community/developer-forum/hide-request-states-based-on-user-role/m-p/2662...:
Please use below code and let me know,
function onLoad() {
if (g_user.hasRoleExactly("pm")) {
g_form.removeOption("request_state", "closed_skipped");
}
}
You off course should change the "pm" to the roles that you're referring, and also the "removeOption" to remove the cancel state which you want.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/