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.

Need to hide App Module based on group

Ratan B
Tera Contributor

Hi Community,

 

I have requirement to hide the App Module based on group, since 2 groups have same rule and doesn't have any unique role between these group.

Is there any ways to control the visibility of App Module based on Group..?

 

Thanks....

1 ACCEPTED SOLUTION

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Ratan B ,

You can refer below thread :-

Can you restrict showing a module link by group instead of role? 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Ratan B ,

You can refer below thread :-

Can you restrict showing a module link by group instead of role? 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Mohith Devatte
Tera Sage
Tera Sage

HELLO @Ratan B ,

1)you can create an ACL on app module table and in the advanced script you can write a script to check if the logged in user is part of those two group using gs.getUser().isMemberOf('your group name');

OR

2)You can create a query BR to restrict the visibility like below 

if(gs.getUser().isMemberOf('Group A')||gs.getUser().isMemberOf('Group B'))


    {


    current.addQuery('sys_id', '5212632ced4f5500b14f689a971ad873');//sys_id of the application


    }

hope this helps 

mark the answer as correct if this helps you in any way 

 

Thanks