- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 01:16 AM
I have requirement to hide Edit button from Related list for all ITIL except for one specific catalog item, as this Edit UI Action button is a global UI action how can I achieve this?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 03:12 AM
you can configure list control and add "Omit edit condition" script field on form layout if not already present.
1) Visit the RITM form
2) Configure list control for that Approvers related list
3) Add script mentioned below
4) No need to update the global UI action
If it evaluates to false - it will show button
If it evaluates to true - it will be hiding
Sample Script below:
Note: just mention the catalog item sys_id for which you need to show
var catalogItemSysId = ''; // catalog item sys_id here
if(parent.cat_item == catalogItemSysId)
answer = false;
else
answer = true;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 03:15 AM
Hi there,
You could achieve this configuring the List Control for Omit edit condition. Out-of-the-box, Omit edit condition is NOT on the List Control form lay-out. Read about it in this article which I wrote a while ago:
List Control Omit * condition
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
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
‎07-22-2020 04:10 AM