Need to hide new button when viewing from a specific module

Mike D1
Giga Guru

Hi

I have created a new application menu/module for a group in our organization. When these users are selecting this module I want to hide the new button in the list view. 

How can I change this only for this module?

 

find_real_file.png

Thanks

Mike

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Mike D 

2 approaches

1) List control

you can use script in the Omit new condition field when you configure the list control on that table

answer = !gs.getUser().isMemberOf('Group ABC'); // give group name here

find_real_file.png

2) Table level CREATE ACL

Update table level CREATE ACL and use this script in advanced sectionn

answer = !gs.getUser().isMemberOf('Group ABC'); // give group name here

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Aniket Sawant2
Giga Guru

Hi,

Navigate to list control and click new role add specified role 

keep Omit new button unchecked and save  

find_real_file.png

 

please mark correct/helpful based on an impact.

Regards,

Aniket S

Ankur Bawiskar
Tera Patron
Tera Patron

@Mike D 

2 approaches

1) List control

you can use script in the Omit new condition field when you configure the list control on that table

answer = !gs.getUser().isMemberOf('Group ABC'); // give group name here

find_real_file.png

2) Table level CREATE ACL

Update table level CREATE ACL and use this script in advanced sectionn

answer = !gs.getUser().isMemberOf('Group ABC'); // give group name here

Regards
Ankur

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

Hi Ankur

Option 1 is definitely suitable (option 2 won't as I still need them to create by other means), but it doesn't seem to work as expected. It hides the  button for any user even if they aren't in the group???

find_real_file.png

Hi Ankur

I removed the ! and it is now working as expected.

 

Thank you

Mike