Restrict Priority is critical on Incident for incident_manager role by using ACL

Kishore47
Tera Contributor

When a user navigates to incident form, then critical priority can be selected only by the user with the Incident Manager role. Other role users should not have access to make incident priority as critical

 

Can anyone please help for this??

5 REPLIES 5

Sumanth16
Kilo Patron

Hi @Kishore47 ,

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {

 

if (isLoading || newValue === '') {

 

return;

 

}

 

//Type appropriate comment here, and begin script below



var isTeamManager = g_user.hasRole('JR - Team Managers');

 

if (!(g_user.isTeamManagers))



{

 

alert('Your manager is required to lower the incident priority. Please contact your manager');

 

g_form.setReadonly('priority', true);

 

}

else{

g_form.setReadonly('priority', false);

}

}

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regard

Hi @Kishore47 

 

Along with above case, make sure you create oncell edit client script, so that user cant change priority  form list view as well.

*************************************************************************************************************
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]

****************************************************************************************************************

Hello Sir,

Above case is not working properly

Can you please help me with ACL or Client Script if it is possible

can you please share any way doing it with ACL.