- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:30 AM
What is the best approach to limit all users other than admins to only be able to save/submit new incidents in a new state? The options to change the state to in progress, on hold, resolved or cancelled should not be visible until after the creation of an incident.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:46 AM - edited 01-04-2024 06:46 AM
something like this in an onload client script
if(!g_user.hasRole('admin') && g_form.isnNewRecord())
{
// set value of state or make it read only
g_form.setValue('state', 1);
g_form.setReadOnly('state', true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:43 AM
HI,
You can just hide the state , when user is not admin && incident is new, you can do so via client script.
Will that work for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:46 AM - edited 01-04-2024 06:46 AM
something like this in an onload client script
if(!g_user.hasRole('admin') && g_form.isnNewRecord())
{
// set value of state or make it read only
g_form.setValue('state', 1);
g_form.setReadOnly('state', true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:51 AM
Killing it... Experience....
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:44 AM
I am not 100% agree, as this is required to modify the basic functionality of system. If you want to do , you can use BR to hide the rest of state.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************