based on the roles want to set the field editable

chinna
Mega Guru

Hi team,

based on the itil and incident_manager role i want to make field editable on incident form.

for example, if user selects the field status = false and qualified = false in the incident form, want to give the permission to edit the field category  in incident form who has contain itil and incident_manager role. even admin also not able to edit that field without those roles.

can anyone help me with the acl script.

 

Regards,

chinna

10 REPLIES 10

@chinna 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dhananjay Pawar
Kilo Sage

Hi,

Create field level Write ACL.

incident.<fielde>

In role section add those roles

make sure you unchecked admin override check box

add conditions like field status = false and qualified = false

 

Thanks,

Dhananjay.

 

Ankush Jangle1
Kilo Guru

hello,

You have to apply the ACL on the table 

if(gs.hasRole('rolename'))

{

answer=true;

}

 

 

Please Mark it as Helpful/Correct if it Helps you

Sajilal
Mega Sage

Hi chinna,

Try creating the ACL script and then share with us if you are facing the issue. To start scripting in ACL you should find lot of links on community like

https://community.servicenow.com/community?id=community_question&sys_id=eecde0addba13744e0e80b55ca961926

Please Mark as Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.

Thanks,
Saji

Anil Lande
Kilo Patron

Hi Chinna,

ACL's execute on server side so whenever you open any form and form is loaded ACL's are already executed. 

Your requirement is somethin related with UI Validation along with Server Side validation.

I would suggest you to have a ACL and onChange script combination for this requirement. You can achieve this with onChange client script as well. you can use g_user.hasRoleExactly() to check user roles in client scripts.

 

Thanks,

Anil

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande