Admin Overrides is not working on Filed level ACl

Rajesh Bandila
Tera Contributor

Hi,

 

I have written the filed level ACL to make it filed as editable for role "ITIL". I want to make it filed as non-editable for admin role users. I have uncheck the admin overrides checkbox, but it's not working. I have written the below script to make it false for admin users but it's not working.

 

Could you please let me know how to configure this? I want to make it field as non editable for "admin" users if current state is "pending".

Screenshots for your reference:

RajeshBandila_0-1720536826460.png

RajeshBandila_1-1720536883759.png

 

 

script:

 var answer = false;
if(gs.getUser().hasRole('admin') && gr.u_status == 'pending')
{
    answer = false;
}
 
Thanks,
Rajesh B

 

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@Rajesh Bandila Noticed an error in your field level ACL. you are using gr object which doesn't exist inside the ACL script. Instead current should be used. Please update your field level ACL as follows and see if it works.

 

var answer = false;
if(gs.getUser().hasRole('admin') && current.u_status == 'pending')
{
    answer = false;
}