- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 02:35 AM
Hi,
There are scenarios where we want to prevent user from editing records in both form and list (for example when a task is closed or cancelled). What is the best way to achieve it in our UI platform? As there are too many fields it is hard to add each field manually in UI Policy Actions. Should we use client script for both form and list? I also want to know if ACL is an option. Thank you for your support!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 11:57 PM
Hi, yes you can use write ACL's to make fields or records read only, if the ACL answer is false then the impacted users will not be able to write to the field/record. However the overhead of 'properly' developing, testing and deploying ACL's is just as high, if not higher than adding fields to a UI policy.
I would not recommend client scripts as a solution and to quote the docs
'With the exception of onCellEdit() client scripts, client scripts only apply to forms and search pages'
https://docs.servicenow.com/bundle/sandiego-application-development/page/script/client-scripts/concept/client-scripts.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 11:57 PM
Hi, yes you can use write ACL's to make fields or records read only, if the ACL answer is false then the impacted users will not be able to write to the field/record. However the overhead of 'properly' developing, testing and deploying ACL's is just as high, if not higher than adding fields to a UI policy.
I would not recommend client scripts as a solution and to quote the docs
'With the exception of onCellEdit() client scripts, client scripts only apply to forms and search pages'
https://docs.servicenow.com/bundle/sandiego-application-development/page/script/client-scripts/concept/client-scripts.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 04:13 AM
Hello,
Thank you for the informative response. Following my comprehension, is using UI policy the best solution?
Many thanks,
Tuan Anh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 01:31 AM
Hi Tuan,
You can use Data policy to achieve this. It will even restrict updating the columns from transform maps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 04:12 AM
Hello,
Thank you for your response. I understand that Data policy runs on server-side, hence should I convert it to UI policy to improve user experience at the front-end side as well?
Many thanks,
Tuan Anh