Create ACL display Record for custom field List

Dinh Nguyen
Kilo Sage

Hello everyone,

I have created a custom field with type List in the table HR Case[sn_hr_core_case] and I have created an ACL to set if the logged in user in the List can read the Record. but it doesn't work.

Please someone help me.

Thank you so much.

 

Here is my ACL:

DinhNguyen_0-1728951436752.png

DinhNguyen_1-1728951472599.png

Here is Script of ACL;

answer = false;
var userToCheck = gs.getUserID();
var userList = current.u_read_user_list;
var isUserAlreadyAdded = userList.includes(userToCheck);

if (isUserAlreadyAdded) {
    answer = true;
}
Here is my custom field:
DinhNguyen_3-1728951568441.png

 

 

1 ACCEPTED SOLUTION

Hi @Omkar Mone ,

Thanks for helping me and sorry for the late response.

I found a Business Rule that affects List display is "Restrict query". I have added the code from row 17 to 19 as the image below:

DinhNguyen_0-1729478959126.png

 

 

 

View solution in original post

7 REPLIES 7

I feel the previous read acl is blocking it, can you try to add a read.none on your condition.

 

Debug ACLs to see which one Is blocking so you can apply it likewise.

Hi @Omkar Mone ,

Thanks for helping me and sorry for the late response.

I found a Business Rule that affects List display is "Restrict query". I have added the code from row 17 to 19 as the image below:

DinhNguyen_0-1729478959126.png

 

 

 

That's good but why edit OOB code? It will skippd during the upgrade and you might miss updates that come in newer releases. Suggest you to write a new one with same conditions. Hope this helps.