Hide fields in a list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:58 PM
Hi All,
There are some fields which I want to be hidden in form and list. The user should not able to select it even when personalizing the list. I know we can do this with ACL but as I have approx 100 fields so I'm just looking if anyone has any other suggestions for it.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:35 PM
field level READ ACL is one approach.
I don't think any other approach.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:38 PM
There's a save_as_template ACL which uses something called a "root_rule".
The ACL sys_id is "ffd83d68db42320002533691f0b8f504" and the important part of the code looks like this:
var excluded = ["number","kb_knowledge_base","topic","workflow_state","kb_category","category","disable_commenting","disable_suggesting","author"];
if (col.indexOf('sys_') > -1 || excluded.indexOf(col) > -1)
answer = false;
I've never used this, but I think I did some testing that you could technically define fields that should not be allowed without having to write a separate acl for each. Of course if you have other field level rules already those might overwrite this.
So if you mark your rule as a read rule and (for example) "incident.*" you could use the above examples to say that people don't have read access to X amount of fields that you've defined in the excluded list.