- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 02:14 AM
Hi Experts
I need to hide a related list from a Form which I have added it as a form Layout an dnot as a related list,
I have a section and in this section I wanted to add this related list. I right click and Personilize form and add this List.
now I need to hide this list and show it only if the field above showing YES.
I have tried in the Client script and UI Policies with
g_form.showRelatedList('u_other_employee.u_change');
OR
g_form.setVisible('u_other_employee.u_change', false);
But nothing happens.
BTW I got the name of the related list from the List control Value.
if I add this list from the related list layout the script works and I can hide it, but why it doenst work when it is from the Form ?
anyone has an idea?
Thanks
Elias
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 03:19 AM
If you say that you are using a related list in a section, i think you mean embedded list.
Check this link, it explains how you can controlvisibility of related lists and embedded lists both

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 02:23 AM
I just tried this below code to show and hide "Task SLA" related list
Hide: g_form.hideRelatedList('task_sla.task');
Show : g_form.showRelatedList('task_sla.task');
Check is any other Ui policy over riding this hide and show option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 02:30 AM
Thanks for your quick response.
Yes I have checked all Policies and I do not override it, the problem is not the policy itself as if I add this list from the related list layout and not from the Form Layout the policy or clientscript will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 03:03 AM
You can hide the section if you want..
var sections = g_form.getSections();
var summary= sections[0]; //you have to catch the right section here
summary.style.display = 'block'; //to show
summary.style.display = 'none'; //to hide.
And if you are using a related list then you can use what Harish showed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2015 03:08 AM
I do not want to hide a section completly , I need only to hide one related list but which I add it on the section. and not on the form completly.
maybe my issue is only that I do not catch the related list correctly.
please tell me what is the diffrence between adding a related list from the list layout and a related list adding it from the form layout?
I am using this code:
g_form.showRelatedList('u_other_employee.u_change');
but maybe it is not the right name of the form list.