How to hide/show related lists based on the View

Community Alums
Not applicable

Hi, I have a requirement to hide related lists depending on which view the user is in.

I have a UI Policy set to hide a related list depending on a response to a field, but am unsure how to write it based on the view type. 

As you can guess I'm only just learning scripting, anyone point me in the right direction? 

function onCondition() {
g_form.hideRelatedList('example.task_id_list');
}
1 ACCEPTED SOLUTION

p t1
Kilo Sage
Kilo Sage

Hi,

 

In your UI Policy , uncheck global and select view on view field.

 

find_real_file.png

Please mark correct if helpful.

 

Thanks,

preethi

View solution in original post

7 REPLIES 7

Gopi Naik1
Kilo Sage

Hi  James,

           Open the form in which view you want to hide the related list.Then from context menu go to Configuration-->Related Lists,and remove the selected related lists.

 

 

If I'm able to solve your requirement please mark helpful.

If my solutions helps you to resolve the issue, Please accept solution and Hit "Helpful".

Thanks,
Gopi

Community Alums
Not applicable

Thanks Gopi

My issue actually got sorted a bit further up. In the UI Policy i just had to untick global then i could apply the rule to a view.

Out of interest though i did just test your suggested method. Related lists get added to all views on the form when you add them, not just to the view you are in at the time. 

Unless I'm doing something wrong. 

Regards, 

James

Hi 

James,
 
           if you want to remove related list from a form for a particular view,first you have to open the form in required view and then follow my process.
If my solutions helps you to resolve the issue, Please accept solution and Hit "Helpful".

Thanks,
Gopi