Enforcing field level security using Salesforce Apex Class

You can determine field level security by using getDescribe() . Below is the example,

Schema.DescribeFieldResult fieldld = Account.Phone.getDescribe();
Boolean notHidden            = fieldld.isAccessible();
Boolean notReadonly          = fieldld.isUpdateable();

Written by 

Salesforce MVP | Lightning Champion | 17x Salesforce Certified | Application Architect | 7x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *