May 2019
Intermediate to advanced
546 pages
12h 41m
English
Selecting fields in a query and Apex running in system mode will provide user access to a field that probably contains sensitive information, and you don't want to share this information with all your users. So, we should verify if a user has access to the respective fields. Sometimes, you want this (if a value that the user doesn't see needs to be compared with a specific value), but sometimes not.
With the Schema class and the DescribeFieldResult class, you can access the information about whether the user has access to the respective field of the respective object. With the following code, we receive the full field description of a field in an object:
Account.Industry.getDescribe();
The most important properties to ...
Read now
Unlock full access