hide module using script

soukayna
Tera Contributor

hi,

is it possible to hide or show Module using condition in a script ?

thanks,

Soukayna

3 REPLIES 3

Mihir Mohanta
Kilo Sage

Yes. You can write before query business rule in the "sys_app_module" table to hide some modules through script.


Jaspal Singh
Mega Patron
Mega Patron

Hi Soukayna,



Not sure if you making it complex better to get its visibility set by Roles.


find_real_file.png


joshuamayes
Giga Expert

I've gotten this response from HI for this question:

 

Unfortunately, controlling visibility of application menus/modules via scripting is currently not possible. There are several reasons not limiting to:

- Security hardening reasons: Any kind of script (client or server side) won't execute on application menus and modules.

- Restricting via ACLs and/or Business Rules won't work because, the modules do not query the target tables (and hence, don't get triggered).

- Filter navigator searches are done on client side and plus the quick search results you get is because of browser cache.

- Using a script will put a load on the system where caching is not involved and could cause performance issues.

 

This is also documented here: https://hi.service-now.com/kb_view.do?sysparm_article=KB0714270