The CreatorCon Call for Content is officially open! Get started here.

Can't hide related list

TzachB
Giga Contributor

Hello everyone,

I'm try to hide all related lists on my form  but it's doesn't work for me.

I tried g_form.hideRelatedListS(); all the related lists are disappeared except one.

I tried to hide the specific list but it's still there. (g_form.hideRelatedList('REL:7bb4a2e0134e6e001b8f3598d144b03b');)

 

Thank you,

Tzach.

20 REPLIES 20

case menu -> configure -> related lists ->  inside the "selected" list -> the list name is "cases for subject person", it's a OOTB related list in HR module.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Consider using a No code solution for this. There's no need to code this. Also like Abhishek mentioned, try to avoid coding sys_ids.

See a No code solution below. Just a UI Policy with a UI Policy Related List Action:

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hey, thank you for your reply,

 

I don't have this tab, maybe the reason is that my instance is on Kingston version?

 

Ah Kingston. Indeed, this was introduced in London. I mentioned this because your thread has "Version: London".

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Ajay_Chavan
Kilo Sage

HI,

 

Related List APIs:

Show Related List
g_for­m.s­how­Rel­ate­dLi­st(­<re­lat­edl­ist­tab­len­ame­>);
Hide Related List
g_for­m.h­ide­Rel­ate­dLi­st(­<re­lat­edl­ist­tab­len­ame­>);
Show All Related Lists
g_for­m.s­how­Rel­ate­dLi­sts();
Hide All Related Lists
g_for­m.h­ide­Rel­ate­dLi­sts();

 

DO MARK IT AS HELPFUL IF THIS RESOLVES YOUR QUERY 🙂

 

REGARDS,

AJAY

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****