How to hide defined related list using script?


Instructions

The documentation (https://docs.servicenow.com/csh?topicname=c_GlideFormAPI.html&version=latest) 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:
g_form.hideRelatedList('REL:sys_id');

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

Use the script below:
g_form.hideRelatedList('REL:70e80f390a0a0b1b0035a51d8bbfd32c');