- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:33 PM
Hi Community!
I try to figure out why on my custom table which i extended from sn_customerservice_case and has no own ACLs on it following code is not working as i would expect:
var record = new GlideRecord('sn_customerservice_standard_case');
record.get('9e58ecc5dbd781904682e03cd3961973');
record;
record.state.canWrite() //returns false?
//same record but parent table used
var record = new GlideRecord('sn_customerservice_case');
record.get('9e58ecc5dbd781904682e03cd3961973');
record;
record.state.canWrite() //returns true
As i am using the same record i would assume that in both code-samples canWrite() would give me the same answer.
Also i don't have any extra ACL on sn_customerservice_standard_case table defined, so as far as i know the ACLs from parent should be in place.
Even also i use an admin user which should always canWrite()?
If i overlooked an ACL or anything else i would be thankful for the right direction.
Or is it a bug?
Thanks
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 03:00 AM
To answer my own question:
The reason why it was returning false on the custom table is, because canWrite() also evaluates the Dictionary Override for "Readonly".
On the custom table there is a dictionary override defined readonly true and on the OOB sn_customerservice_case table its not.
If i remove the Readonly-Flag of the Dictionary Override for sn_customerservice_standard_case table the code also returns true.
But i still find it funny that its not the same and the dictionary override is only used when i define the GlideRecord on the sn_customerservice_standard_case table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:41 PM
Hi,
You will have to create ACLs for your custom extended table.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 01:02 AM
But what if i don't want to create own custom acls for my table? I don't want to reimplement all the OOB ACL from the sn_customerservice_case table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 03:00 AM
To answer my own question:
The reason why it was returning false on the custom table is, because canWrite() also evaluates the Dictionary Override for "Readonly".
On the custom table there is a dictionary override defined readonly true and on the OOB sn_customerservice_case table its not.
If i remove the Readonly-Flag of the Dictionary Override for sn_customerservice_standard_case table the code also returns true.
But i still find it funny that its not the same and the dictionary override is only used when i define the GlideRecord on the sn_customerservice_standard_case table.