Issue with READ TABLE LEVEL ACL

Michael51
Tera Guru

Hello All,

I have an issue with ACL

Requirement is to create an Read ACL to show records which are opened by them , I have created an record type with read operation by Including this script in script box

answer = current.getValue('opened_by') === gs.getUserID() , I could see this "User not allowed to access table:

Michael51_0-1692714768895.png

can anyone help me here

@Ankur Bawiskar @jaheerhattiwale 

9 REPLIES 9

umaaggarwal
Giga Guru
Giga Guru

Hi Michael,

 

Did you impersonate correct user and tried if working ?

Also you can use debug security to see what exactly is creating the issue. 

 

Thanks!

 

yes I did impersonated correct user and even I have couple of records opened by me but list shows 

Number of rows removed from this list by Security constraints: 100

 

In debug I could see this ACL is restricting the access

Hello @Michael51 

 

getValue will not work in the ACL Script :-

 

Write this Script:-

 

 

 

var value = current.opened_by;
if(gs.getUserID()==value){
answer=true;
}

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

Ankur Bawiskar
Tera Patron
Tera Patron

@Michael51 

script is not required for this.

you can use condition field

AnkurBawiskar_0-1692716205676.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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