- 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 01:27 AM
Hey micky09,
In the list control give omit edit conition:
Have look on Below threads;
Mark Correct an Helpful if it helps!!!
Best Regards,
Namrata.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2020 01:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2020 02:56 AM
Thank you for the reply I need to achieve this on RITM table
- 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