- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 04:07 AM
Hi, I have a question. I want to make all fields only readable when the status is closed or canceled for Change requests and for Change tasks.
What is better? Use ACL or Client Script?
I tried it with ACL, but I thinks with ACL its not working, that doesnt make the fields read-only, its only for access the table for users or for nobody to do something or not. Right? Or I made it in a wrong way 🙈 When I created a ACL with read only for states New until Review, then will be the Canceled and Closed records no more shown in the Record list.
When I use unload Client script, I tried it with this code (at first for cancel state):
Is it right or what I have to change, because its not working in the moment.
Kind regards
Nicole
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 09:01 AM
As client scripts execute before UI policy, so whatever is being done through client script will be overridden by UI policy if any conflict happens. In this case, review the existing ACLs for change_request table and modify them. Set the condition in those existing ACL as "State is not one of Closed or Cancelled" so that those ACL logic doesnt apply to your new ACL, which is a * acl, restricting all users from writing any field for the CLosed or cancelled record.
Check this URL to findout exisiting ACL for change_request.- https://devXXXXX.service-now.com/sys_security_acl_list.do?sysparm_query=nameSTARTSWITHchange_request...,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 04:37 AM
Hi @nherm
Hi, I have a question. I want to make all fields only readable when the status is closed or canceled for Change requests and for Change tasks.
In this case UI Policy. OOTB Examples.
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
11-17-2023 05:43 AM
Hi Atul,
thanks for your quick answer 😀. But Im searching not for a UI policy. When we later get more fields, I dont want to change this UI Policy again, thats why I want to create an ACL or a Client script. To make at the end all fields for the Change request read only, also when new fields will gonna be created.
Hope you getting my point and have an idea 🤗
Kind regards
Nicole
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 05:52 AM
Hi @nherm
Got your point. So in this case do ACL, with .* , as it cover all fields but what role you will add. If you leave the role blank will it be issue or not. Please have a look on same.
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
11-17-2023 06:04 AM
Hi Atul,
I already tried this. If I delete the role "snc_internal" then it come again when I open again the ALC rule.
and the fields in the change record are still editable 😞