Hide "New" button based on GlideRecord of another table records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2025 12:10 AM
Hi,
I have a table called "ABC" and another table called "XYZ", In both tables there is a field called "item" referencing item table, and in the "ABC" table list view I want to show "new" button only those who have permissions, for others it should be hidden. For that I am creating "Create" ACL in the "ABC" table.
I want to show "new" button only to the people who are in the assigned_to/assignment_group of the "XYZ" table record. I am taking GlideRecord "XYZ" table, for all the "XYZ" table records, and querying with "item", (i.e., in both "ABC" table record and "XYZ" table record, the item record should match), and checking assigned_to/assignment_group member (matches with current user) of that XYZ table records, and finally returning "answer=true" in "create" ACL script of "ABC" table. But it is not working..
As the new button is the list view, and not in the form view, will this GlideRecord method works, to fetch "XYZ" records for a particular "ABC" record, based on "item" field (should match in both records) ?
Will it work or is there any alternative for it?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2025 12:19 AM
Sorry very difficult to understand without screenshots.
As you are using Table level Create ACL it won't have access to the current object
share your script and ACL config screenshots.
If my response helped please mark it correct and close the thread so that it benefits future readers
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader