Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Related list condition not working (hide "ADD" button)

DoDo labs___
Mega Sage

Hi,

 

 

The UI Action called "Add" has the following condition:

 

RP.isRelatedList() && current.canCreate() && parent.active == true && (gs.getProperty('com.snc.task.add_change_request').split(',').indexOf(parent.getTableName()) > -1) && !RP.getListControl().label .equals('Related Changes')

 

The problem is that the "Add" button is also visible in the "related Changes" list too.

 

How can I hide the "Add" button?

 

1 REPLY 1

Bert_c1
Kilo Patron

I suggest you remove the conditions, and add 'alert();' lines showing the value of each condition within the script.