Need to hide "Edit" button from Approval Related List

micky09
Tera Contributor

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?

find_real_file.png

1 ACCEPTED SOLUTION

@micky09 

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;

find_real_file.png

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

11 REPLIES 11

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn

Bhagyashri Sort
Kilo Guru

Hi,

 Configure - > List Control and check the omit edit button

find_real_file.png

 

find_real_file.png

 

Mark it correct and helpful.

Thanks

Bhagyashri Sorte.