Assignment Group access to work notes and additional comments

Insider
Giga Guru

The assigned group working on the cases must have access to work notes and additional comments on the case.

1 ACCEPTED SOLUTION

HI Shafi ensure there is only one write ACL on the table for worknotes. 

script:

if(gs.getUser().isMemberOf(current.assignment_group.sys_id))
    answer = true;

Refer attached screenshot for example 

1. members of group can edit and see worknotes

2. ITIL user Non member of group cannot see worknotes

Regards
Harish

View solution in original post

29 REPLIES 29

Thanks a lot for all your help! It worked.

Marking as correct.

Ankur Bawiskar
Tera Patron
Tera Patron

@Shafi

you can have field level WRITE ACL on those 2 field work_notes and comments

Please ensure no other field level WRITE ACL is allowing access since if there are multiple field level WRITE ACLs and even if 1 allows access it won't evaluate your ACL

Advanced Script:

answer = gs.getUser().isMemberOf(current.assignment_group.toString());

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello Ankur, 

There is already an ACL working for worknotes, so the new ACL with my condition for groups wont work?

Hi,

Remember to keep only 1 field level WRITE ACL on each of those fields.

If you have multiple field level WRITE ACLs and if your ACL blocks but other ACL allows then system would allow the edit.

OR

you can handle this logic without ACL

1) create display Business rule on your table to check if logged in user belongs to that group or not; store that in g_scratchpad variable

2) then use that g_scratchpad variable in onLoad client script and make the field as readonly if the value of variable is false (means not a member)

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader