The CreatorCon Call for Content is officially open! Get started here.

enable attachments for group members

DreDay3000
Giga Guru

Hello, I am trying to allow users of certain groups to be able to modify attachments on the RITM. I currently have an write acl with a script but doesn't seem to work. any help is appreciated

DreDay3000_1-1718914828903.png

DreDay3000_0-1718914761964.png

 
if(gs.getUser().isMemberOf('GPC A/BO' && g_form.getDisplayBox('cat_item').value == 'Purchase Request' )) {
  answer = true;
}
else{
answer = false;


}
1 REPLY 1

Slava Savitsky
Giga Sage

g_form is a client-side API and therefore cannot be used in an ACL script. You need to use an appropriate server-side API instead. Additionally, one of the brackets in your code seems to be misplaced. Give this a try:

if (gs.getUser().isMemberOf('GPC A/BO') && current.cat_item.name == 'Purchase Request') {
    answer = true;
} else {
    answer = false;
}