Hide UI Action on the basis of certain conditons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:03 AM
I want to hide UI action on the basis of certain condition. I have written script include and I am calling that script include in UI action condition. It is not going in script include, I am not getting logs as well. Can anyone please help as it is not working as expected.
Script include :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:54 AM
So than you're query is incorrect. Please fix it.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:58 AM
Can you please help me in this case as in what object can I pass for the button visibility.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:59 AM
Now you are quering the number field (which is NOT a reference), with current.sys_id (which is a reference).
So what could you use to query? What would be correct? I don't know, since it's your custom application.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 11:12 PM
Any luck? Or still help needed?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 04:41 AM
Hi @Pratiksha Lang1, Can you try calling the script include in the background script by passing the gliderecord object or sys_id and see if its printing any logs?
Regards,
Sunil