How to get sys_id or name of a related list in the condition field of UI action?

Jaydee1
Tera Guru

Hi All,

Is there any method or way through which I can get the sys_id or name of the related list in the 'condition' of UI action and hide it then on the same related list?

Thanks in advance!

1 ACCEPTED SOLUTION

Bala Krishna2
Mega Guru
Mega Guru

Hi Jaydee,

 

We can achieve this through RP and condition evaluation on script include. Please find below steps 

find_real_file.png

 

find_real_file.png

 

Here I tried to show it only for "incident.parent_incident" related list.

OutCome:

find_real_file.pngAppearing on Child Incident

find_real_file.png

 

Hidden on other related list for same table Incident. Let me know if this helps.

View solution in original post

5 REPLIES 5

Allen Andreas
Administrator
Administrator

Hi,

If you don't mind, can you clarify your question?

Are you saying you have a related list, with a ui action on it and you want to hide the button on that related list if the related list sys_id (or name) is 'x'?

Or are you saying you have a UI action and want to know if you can get the sys_id (or name) of a related list and use the UI action to then hide that related list?

Related post by same user...: https://community.servicenow.com/community?id=community_question&sys_id=e68f3903db01e810f21f5583ca96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Jaydee1
Tera Guru
Hi Allen, I have 2 related lists on the on a table and both the related lists are from same table. I want to hide a custom UI action on one of the related list and want it present on the other one. How can I implement this? Thanks, Jaydee

Bala Krishna2
Mega Guru
Mega Guru

Hi Jaydee,

 

We can achieve this through RP and condition evaluation on script include. Please find below steps 

find_real_file.png

 

find_real_file.png

 

Here I tried to show it only for "incident.parent_incident" related list.

OutCome:

find_real_file.pngAppearing on Child Incident

find_real_file.png

 

Hidden on other related list for same table Incident. Let me know if this helps.

I got it implemented.Thanks a lot Bala Krishna 🙂