Need Help in scripting

Aparna Gurav
Tera Contributor

I have one requirement 

 

if  ‘Is this a privacy incident?’ variable = 'Yes', then the Privacy Team  group should be automatically added to the 'Access Allowed For Groups' field in the 'User Access' tab. 

Can anyone suggest How to achieve this requirement?

 

AparnaGurav_1-1704380631508.png

 

 

AparnaGurav_0-1704380558792.png

 

1 ACCEPTED SOLUTION

Sainath N
Mega Sage
Mega Sage

@Aparna Gurav : In your record producer script, try this:

 

if (producer.your_check_box_field_name == true) {
    current.your_field_name_of_access_allowed_for_groups = '<your_sys_id_of_group>';
}

 

sainathnekkanti_0-1704384910535.png

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution. 

 

 

View solution in original post

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Aparna Gurav 

 

Greetings!!

This can be do able via Flow.

 

Here is another use case but will help you to do your work#

 

https://www.servicenow.com/community/now-platform-forum/how-to-add-group-members-from-a-catalog-item...

 

*************************************************************************************************************
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]

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

Sainath N
Mega Sage
Mega Sage

@Aparna Gurav : In your record producer script, try this:

 

if (producer.your_check_box_field_name == true) {
    current.your_field_name_of_access_allowed_for_groups = '<your_sys_id_of_group>';
}

 

sainathnekkanti_0-1704384910535.png

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.