hide New button based on some condition in related links

maramanjali
Tera Contributor

Here is snap in this snap the highlighted New button hide based on condition.

condition 1 : if user had admin, can able to see the new button
condition 2: the highlited, managed by group member -  who has any one part of that group member also able to see that button.
and the above 2 conditions also satisfied the edit, create of the record in Related URl's. please help on this.

 

maramanjali_1-1757101448979.png

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@maramanjali 

you can configure list control on that related list

Then write script in Omit New Condition field

something like this

if (gs.hasRole('admin') || gs.getUser().isMemberOf(parent.managed_by_group))
    answer = false; // don't omit means show
else
    answer = true; // omit

AnkurBawiskar_0-1757142118334.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader