ACL Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 11:43 AM
Hello All,
Creating a read ACL on cmn_location for snc_external so that on CSM portal the use can see case location for only that account.
This is the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 08:18 PM - edited 02-10-2024 08:19 PM
@CV1 ,
Try below:
answer = mylocation(current);
function mylocation(current){
if(current.custom_account_field.primary_contact == gs.getUserID()){
return true;
} else {
return false;
}
}
I am assuming you you want to check if the currently logged in user is the primary contact for that account and you are able to refer the account directly from the cmn_location table, as mentioned above.
Please accept solution OR mark helpful.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 08:24 PM - edited 02-10-2024 08:30 PM
Don't have primary_contact and contact is "empty" in our table cmn_location as well as Table: customer_account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:47 AM
@CV1 ,
I think this is a data issue, and this needs to be fixed by your data management team.
The script should work as long as the data in the tables is correctly maintained.
Please try adding some demo users/data into the required fields and verify if the script works.
Please accept solution OR mark helpful.
Thanks,