Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Restrict fields through ACL

Devansh00
Tera Contributor
Suppose I have created ACLs on the Incident table and granted the ITIL role access at both the table level (incident) and field level (incident *). Now, I have a requirement to hide a specific field, such as short description, from users with the ITIL role while keeping access to the rest of the Incident record and other fields. How can this be achieved.
4 REPLIES 4

Shaik Dimple
Tera Guru

Hi @Devansh00 

 

You can achieve this by creating a field-level Read ACL on incident.short_description.

A field specific ACL takes precedence over the generic incident.* ACL, so only the Short Description field will be hidden while users can still access the rest of the Incident record.

 

I tested this in my PDI, and it worked as expected. I've attached screenshots for reference.

ShaikDimple_0-1785652360388.png

ShaikDimple_1-1785652411641.png

ShaikDimple_2-1785652493921.png

 

If this helps solve your requirement, please mark the response as Helpful and Accept it as the solution.

Regards,
Dimple Shaik

 

Nishant8
Tera Sage

Hello @Devansh00 , Create a field-level Read ACL for incident.<field_name>. Add required roles other than itil, ensuring ITIL users do not possess those roles.
Prerequisite: Confirm no conflicting field-level ACLs currently exist on incident.<field_name>.

 

Regards,

Nishant

Rafael Batistot
Kilo Patron

@Devansh00 

 

To hide the field from ITIL users, create a field-level Read/Write ACL explicitly targeting incident.short_description that denies access to the itil role, or use a UI Policy / Client Script with g_form.setDisplay('short_description', false) to remove it from the form layout.

 

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

Tanushree Maiti
Tera Patron

Hi @Devansh00 

 

You can create a Field level ACL to achieve your requirement.

 

Create a specific field-level Read ACL for incident.short_description:

  • Type: Record
  • Operation: read
  • Name: incident.short_description
  • Advanced: Checked

Add a script that explicitly returns false for ITIL users and true for others:

if (gs.hasRole('itil')) {

    answer = false;

} else {

    answer = true;

}

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti