How to hide defined related list using script?


The documentation ( mentions to use the sys_id to hide a list through a relationship.  

Instead of passing just the sys_id of the defined relationship, you will also need to prepend it with the following string 'REL:'

The syntax will be as follows:

For example, to hide the "Incidents by Same Caller" related list on the incident form. 

Use the script below: