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 06:09 PM
@CV1 ,
Can you try setting the answer variable like below:
answer = mylocation(current);
function mylocation(current){
if(current.company == gs.getUser().getRecord().getValue('account')){
return true;
} else {
return false;
}
}
Please accept solution OR mark helpful.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 07:08 PM - edited 02-10-2024 07:11 PM
Hi @ahefaz1 ,
I tried above but when i am loging ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 07:51 PM
@CV1 ,
I did not find a account field on the cmn_location table OOTB.
Is this a custom field on your instance??
Your logs are returning the correct results.
gs.getUser().getRecord().getValue('account') - this will not work
gs.getUser().getRecord() - returns the user table record. The account field does not exist on the user table.
The account field you are looking for in CSM is on the "customer_contact" table.
OOTB to map the location in CSM the cmn_location table is not used. Is this something that has been customized on your instance??
The location is stored directly on the customer account table:
Please accept solution OR mark helpful.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2024 07:59 PM - edited 02-10-2024 08:00 PM
@ahefaz1 ,
yes we have Account on Table: cmn_location which is a reference to Table : customer_account
How do I change the script to work
TIA