Display Modules based on Criteria

eswarijk
Tera Contributor

I need to display modules based on Specific criteria such as if a username is present in certain table.

I saw the possibility of displaying modules based on roles.

Is it possible to display modules based on some conditions..?

11 REPLIES 11

eswarijk
Tera Contributor

Hi amlan.pal@cognizant.com and harishkumar


Thanks for the replies..



My requirement is little different.If the above scenario happens in a single instance i can easily use the sys_id of the module.



But the scenario is different..I am developing a plugin which contains modules.I need to hide modules to different users based on some condition and not based on role.


The plugin will be distributed among many instances.So, I cannot hardcode the sys_id.


Now I need some script to be executed to display modules to users


Hi Eswari,



I believe hardcode sys_id approach is the easiest way in this case. Else, you need to do more query on the sys_app_module to get the exact module after sorting out the rest.


Lets say you want to point out Open module available in the Incident application menu. In this case you need to use object.addEncodedQuery('title=Open^name=incident') to fetch the same module.


Others may suggest any best approach on this. For the time being I can suggest these all.



I hope this helps.Please mark correct/helpful based on impact