- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 03:19 AM
Hi All,
I hope everyone is doing good.
I am aware about the visibility section in module but I need to hide the Create New in Incident application for a specific group.
I created a business rule "on before" "query" under Module table but it seems not working.
I also tried to add gs.log to check if the business rule is working but it wasn't.
can you please help me ?
Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 03:23 AM
Hi Dante,
Hiding modules is only done with roles. The proper way would be to assign a role to that group (or every other group) and apply it to that module. That's the design and short of doing something that is difficult to support and may cause upgrade issues later, that's the method.
Administering Application Menus and Modules - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 03:23 AM
Hi Dante,
Hiding modules is only done with roles. The proper way would be to assign a role to that group (or every other group) and apply it to that module. That's the design and short of doing something that is difficult to support and may cause upgrade issues later, that's the method.
Administering Application Menus and Modules - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2019 12:31 PM
Still follow Chuck's advice on the proper way to hide applications/modules, but just in case you can't do that...I wanted to at least post this "How-to":
Hi,
I just wanted to reply to say that I recently was brought with a requirement to hide a module based off of role (which disallowed me the ability to allow...roles...because there was a conflict there...that's another story...). You can use this same method to hide modules based off of really anything...but you need to ensure you do these things:
1) Use the sys_app_module table for your Business Rule
2) Run Before
3) Query type
4) Use script/advanced section to set the visibility by using something like this:
if (gs.getUser().hasRole('itil')) {
current.addQuery('sys_id', '!=', 'sys_id_of_module');
}
To get the sys_id of the module, you can hover the module in left-hand navigation and click pencil icon, which will take you to the settings page...right-click gray header area and choose "Copy Sys ID".
5) This is the most important step that I was initially missing and I figured it out...YOU MUST CLEAR INSTANCE CACHE (type cache.do in to the left-hand navigation search bar) to flush the cache out.
The reason #5 is necessary is because the modules are stored in the cache...so if you're now trying to limit it and it was already there before the BR was created/active...then it will appear to not work. Clearing the cache sort of resets the module appearance and the BR then takes effect.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!