How do I hide a related list on load?

Chuck Shrader
Mega Contributor

I have created a related list that I only want visible when a certain field is set to Yes. I have created a UI Policy with scripts to make the list show when the field is set to Yes and to hide the list when the field is set to No. The UI Policy works great when Yes is chosen, but the list reappears when the form is saved or when it is opened. In other words, the script appears to work onChange, but not onLoad.  How do I get the list to be hidden when the form loads (if the field is set to Yes)?

I am new to this and am wanting to learn. Thanks in advance for any help.

find_real_file.png  find_real_file.png

1 ACCEPTED SOLUTION
5 REPLIES 5

Estevao Gabriel
Tera Contributor

Tecnically, the ui policy should work. But, if not, you tried to use the same script in a Client Script on Load?