How to make all fields read only on a table(incident) except four fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:36 AM
Hi all,
i have to hide all fields on incident table when the incident is created by Digita.Ai and its assignment group is M2.digita.process other than some four fields(field A, b, c, D).
i want to lock the whole incident form other than four fields(should be editable).
i know that there are different approaches to achieve this functionality like creating ACl/Client scripts/Ui policy
But i could not find what would be the best approach.
can anyone of you suggest the best approach on this.
Thanks,
mouli.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:42 AM - edited ‎07-02-2024 07:08 AM
Hi,
You will need to create one ACL
incident.* with the proper condition where you make the all fields read only.
Then you need to create Individual field level ACLs separately with same condition and make them non editable.
The Main difference between using client sire actions like client script or ui policy would be that they only work on the form, so user will still be able to see those fields on lists.
If it is a security feature why you need to hide or may fields read only then UI Policies/ Client scripts are not recommended as its easy to bypass them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:48 AM
Hi @mouli7 ,
For making all fields read-only on the Incident table except four fields when certain conditions are met (like incident created by Digita.Ai and assignment group is M2.digita.process), using a UI Policy in ServiceNow is typically the best approach. Here's a concise breakdown:
1. Create a UI Policy:
- Navigate to `System Definition` > `UI Policies` and create a new UI Policy.
2. Define Conditions:
- Set conditions based on when the policy should apply (e.g., Incident Created By equals Digita.Ai and Assignment Group equals M2.digita.process).
3. Set Actions:
- Configure the UI Policy to make all fields read-only except for the four specific fields (A, B, C, D) that should remain editable.
4. Submit and Test:
- Activate the UI Policy and thoroughly test its behavior in a development or test environment before deploying to production.
Using UI Policies provides a straightforward way to control field visibility and read-only states based on specific conditions in ServiceNow.
--------------------------------------------------------------------------------------------------------------------
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 07:06 AM
Hi @mouli7,
The best approach would be to make UI policy for those particular conditions where you individually have to mark each field required for read only to be set manually.
However the fastest way to achieve this requirement would be to apply ACL for that particular condition and individually have 4 write ACLs on those 4 exempted fields.
If you found my reply helpful, please mark it as solution and helpful.
Thanks and Regards,
Ehab