Regarding the case limitation of user

Rai Shivam Ajay
Tera Contributor

Case Limitation Behavior:

  • Region = Blank, and Account Access = Blank -> user can see cases for all accounts.
  • Region = Not Blank, Account Access = Blank -> user only sees cases related to customers in the selected Region.
  • Region = Blank and Accounrt Access = Not Blank -> user only sees cases related to customers in the selected Accounts
    it is possible to implement this? If yes ,how can i implement this , Any suggestion
    Thank you
1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Try this way, this is a Read ACL on the Case 

You will need to add the right fields and also might need to modify this to some extent to compare user region and account access to case.

but this gives a basic framework you need to build on.

answer = false ;

if(current.<region field> == '' && current.<account Access field> == '')
{answer = true;}
else if(current.<region field> != '' && current.<account Access field> == '')
{
if(current.<region field> == gs.getUser().getRecord().getValue('<region field on User Table>'))
{
answer = true;
}
}
else if(current.<region field> == '' && current.<account Access field> != '')
{
if(current.<Account Access field> == gs.getUser().getRecord().getValue('<Account field>')) // im not sur ehow the account access and user record are related, you mayhave to derive this somehow
{
answer = true;
}
}

 

-Anurag