The CreatorCon Call for Content is officially open! Get started here.

How to show module to a members of specific group?

Gagandeep kaur2
Tera Contributor

Hi,

I want to show the module to the members of particular group. I have given change manager role to the group and added change manager role in the role field on the module form.

find_real_file.png

This module is visible to admin but i want to hide it from admins as well.

Could you please tell me is there any way to show only to the members of group, not to the admin or any other user?

Thanks.

5 REPLIES 5

Rajesh Mushke
Mega Sage

Hi Gagandeep,



Please Refer



Advanced Group Membership Management - Google Docs




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

Hi Rajashekhar, do you have more google docs like this on other topics? These were really helpful.

Mihir Mohanta
Kilo Sage

Write a before query business rule in sys_app_module table.



Table: sys_app_module


When: before


Query = true



Script:



// Write Group name in place of bold test


if(!gs.getUser().isMemberOf('ServiceNow Support'))


    {


    current.addQuery('sys_id','!=','25b18ab4c0a80009003bbcfd5ac2d481');//sys_id of the"Ready for Approval" module


    }


Henrik Jutterst
Tera Guru

I found this post after looking for similar question. I also found this post that helped me solving my question where a module was not showing for a users that was missing a specific role.



Authorization in ServiceNow should be role based so I assume these users you are talking about have a specific role. Therefore, go to: System Definition > Application Menus > Open the corresponding Application menu > Check the 'Role'



Here is the link to original post: modules not visible



Kind Regards