Module Visibility based on Domain

tj2
Kilo Contributor

Hi,

How can we display modules based on Domain?
On the Modules table 'Domain' field is present, we have included the required domain in that field but the module appears for all domains.
Any way to hide modules based on domain?

Thanks

4 REPLIES 4

tony_fugere
Mega Guru

Did you remove the global module, too?


Hi tj and Tony



Did you find a solution for this? I'd like to show/hide modules based on the sys_domain too.



Thank you


Christina


VS9
Mega Contributor

Hey.. Did you find any solution to this?

Suthan S1
Tera Contributor

Please follow the below steps

1. Create a new role and map that role in the Roles of Application Menu of the specific Module which you want to show to the user in the specific domain.

 

SuthanS1_1-1718270751354.png

Step 2: Frame a ON Before Query Business Rule.

Step 3: In the Advanced Tab

 3.1 Check the condition if the User Has the given customized Role lets say in this case Role as "RoleX" and Check the session is interactive.

Frame the conditions as ("gs.hasRole('RoleX')"&&gs.getSession().isInteractive())

Note:

RoleX refers to the custom role that I have created here for reference.

 

3.2. Script follows as below.

 current.addQuery('sys_id=Module Sys_Id of which you want to show^ORsys_id= ');  ////add the sys id 

 

Please find the below screenshot.

SuthanS1_2-1718271840967.png

 

NOTE:

We can also restrict the users based on the user's groups as well in the condition of the BR.

Its not mandatory to create a custom role to restrict the user's modules.

 

 

Hope it helps.