54. Do you have SQL script to check the permissions for all the fields belonging to a particular object?

Please use the following code snippet in the workbench to check whether any object and its fields have all the relevant permissions.
Workbench link : https://workbench.developerforce.com/login.php

DescribeSObjectResult result = Schema.getGlobalDescribe().get(‘‘).getDescribe();
System.debug(‘Object Accessible:’+result.isAccessible());
System.debug(‘Object Createable:’+result.isCreateable());
System.debug(‘Object Updateable:’+result.isUpdateable());
System.debug(‘Object Deleteable:’+result.isDeletable());
for (Schema.Sobjectfield obj : result.fields.getMap().values()) {
Schema.DescribeFieldResult fldResult = obj.getDescribe(); System.debug(‘Field Name:’+fldResult.getLabel()+’;\tField Accessible:’+fldResult.isAccessible()+’;\tField Createable:’+fldResult.isCreateable()+’;\tField Updateable:’+fldResult.isUpdateable()); }

Important Announcement!

URGENT! Please register the 10-digit business phone number (e.g. 555-555-5555) that your organization uses to send texts to consumers in the U.S. Failure to register may cause heavy penalties and disruption to all your text messaging communications.