Query Business rule

Mahesh137
Tera Contributor

All,

for this requirement I need to restrict records. it should only show those records belonging to their user groups. (for example, if user A belong to 5 groups, then it should show only those records in 5 groups)

Can someone help me out with script here? 

 

 

1 REPLY 1

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Mahesh137 try below options

Write a read ACL on table and put the condition in the advance script

if(gs.getUser().isMemberOf(current.assignment_group))

answer=true;

 

Query BR

if(gs.getUser().isMemberOf(current.assignment_group))
{
current.addQuery('assignment_group',current.assignment_group);
}

 

Don't forgot to make my answer Helpful/Correct, if applicable

Regards,

Siddharam