How to auto set roles to a group based on user input in a field

Jay N
Tera Contributor

Hi Experts,

 

We have a requirement to auto set roles to a group when assignment group is selected from groups reference field from a form and when the group is removed the roles should be removed automatically when the form is saved.

JayN_0-1739803290503.png

 

 

Thanks, Jay

2 REPLIES 2

Viraj Hudlikar
Giga Sage

Hello @Jay N 

 

I believe you can write a before update BR which triggers only if value in group field is changed and if condition passed add desired role to group selected over the record. 

 

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Jay N 

 

Check this BR

 

https://INSTANCENAME.service-now.com/now/nav/ui/classic/params/target/sys_script_list.do%3Fsysparm_q...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************