May 2019
Intermediate to advanced
546 pages
12h 41m
English
You have learned a lot about sharing, which is one of the most important (and powerful) security layers of Salesforce. You can decide which user has access to which record. Even if your database has tons of records, the system can decide very quickly if the user has access to the record or not.
In Apex, you need to verify if the user has access to the record or not by sharing. For each object that has a sharing model other than public Read/Write, you have a Share object as well (such as AccountShare). This share object is a junction object between your record and the user. If you execute the query, you can find out if a user has access to the account mentioned:
SELECT UserOrGroupId, AccountId, AccountAccessLevel ...
Read now
Unlock full access