Read ACL not working for a field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 11:47 AM
Hello,
I am trying to get a certain group to be able to see data in the "approval_set" field. I wrote a read ACL, but for some reason the group still cannot see the data in the field. Any suggestions?
I attached screenshots of the field and my ACL below.
function validate() {
if (current.isNewRecord())
return true;
// Payroll
if (gs.getUser().isMemberOf("765370019f22120047a2d126c42e705c"))
return true;
return false;
}
answer = validate();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:06 PM
@Rylie Markle Instead of passing the sys_id of the group, please pass the name of the group. Here is an example.
var currentUser = gs.getUser();
gs.info(currentUser.isMemberOf('Capacity Mgmt'));
Use isExplicitMemberOf method if you would like to check with a group sys_id.
var isExplMem = gs.getUser().isExplicitMemberOf('b8ef24616fc331003b3c498f5d3ee434');
gs.info(isExplMem);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:10 PM
Hi,
Try this
Change the function name for validate to something more Specific like validateApprovalSet()
Also Comment everything inside the function and just return true, trying to check if it is the script thats faulty or something else that might be interfering here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:14 PM
Hello,
I tried both and still no luck.
Thanks,
Rylie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:18 PM - edited 09-14-2023 12:19 PM
Change the ACL form task to the table in question.
Are there any other ACLs on the same field?
How are you testing this, ill see if i can reproduce it in my PDI