How to hide a Related List

ashaki
Kilo Expert

I would like to hide a Related list from specific users but the following scrip is not working. Can anyone help?

var onb=g_form.getValue('subcategory');

if(onb !='CMDB_CI Configuration'){ //using value of the subcategory to define acces

g_form.hideRelatedList('UnResolved Devices');//want to hide a related list call unresolved devices

2 REPLIES 2

pmorris
Kilo Contributor

Ashaki,


I don't see your closing '}'. Could that be the problem?



var onb=g_form.getValue('subcategory');


if(onb !='CMDB_CI Configuration'){ //using value of the subcategory to define acces


        g_form.hideRelatedList('UnResolved Devices');


}


Pamela


robpickering
ServiceNow Employee
ServiceNow Employee

I'd also strongly suggest posting in the Support forum, as you're much more likely to get a response.



Also "g_form.hideRelatedList()" should take the table name of the related list not the label.



See:   http://wiki.servicenow.com/index.php?title=GlideForm_%28g_form%29