Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shawon39/a4899eaf98a14795a9fd6a5a82d1fd86 to your computer and use it in GitHub Desktop.
Save shawon39/a4899eaf98a14795a9fd6a5a82d1fd86 to your computer and use it in GitHub Desktop.
The provided code snippets are used to check the user's access permissions on the Contact object in Salesforce. The isAccessible() method verifies if the user can read Contact records, isUpdateable() checks if the user can update them, isCreateable() determines if the user can create new Contact records, and isDeletable() confirms if the user ha…
System.debug('Accessible: ' + Schema.sObjectType.Contact.isAccessible());
System.debug('Updateable: ' + Schema.sObjectType.Contact.isUpdateable());
System.debug('Createable: ' + Schema.sObjectType.Contact.isCreateable());
System.debug('Deletable: ' + Contact.sObjectType.getDescribe().isDeletable());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment