How to give access to a module to a selected user in a field of a ticket?

Community Alums
Not applicable

Hello! I have a table where in the ticket you can select a user in a reference field. This user does not have access to the module (because the field refers to all users of the instance). I need this user to automatically have access to the application module when selected in the field. Any ideas? Can I limit or give access to the module through scripts? thanks

3 REPLIES 3

Adrian Ubeda
Mega Sage
Mega Sage

Hello Rocio, 
I'm afraid it's not possible manage this by script, only with roles. Check this link: https://www.servicenow.com/community/developer-forum/can-you-display-an-application-menu-module-base...
You can try to add this user temporary role access for this specific content that the menu has and after remove it... You can create a scheduled job for this or some easy flow

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

Harshal Aditya
Mega Sage
Mega Sage

Hi @Community Alums ,

 

Hope you are doing good.

You can write a business rule to get the user (reference field) to the group.

Assuming - The group has a role that has access to the module.

 

Please mark this response as correct or helpful if it assisted you with your question.

Regards,
Harshal

 

jaheerhattiwale
Mega Sage
Mega Sage

@Community Alums There is no scripted condition in modules. You can restrict the access only through roles. Thats OOTB ServiceNow behavior.

 

jaheerhattiwale_0-1686755558311.png

 

 

If the provided information helpful them mark as correct answer and close the thread.

 

Thanks

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023