Category Archives: Profile

Salesforce: use Apex Code to grant permissions to custom object and fields

List<Id> profilePermissionsSetIds = [ select id, Profile.UserLicense.Name from PermissionSet where IsOwnedByProfile = true and Profile.UserLicense.Name = ‘Salesforce’]; List<ObjectPermissions> objPermissions = new List<ObjectPermissions>(); for ( String pId: profilePermissionsSetIds ) { objPermissions.add( new ObjectPermissions ( SObjectType = ‘Custom_Object__c’, ParentId = pId, PermissionsRead … Continue reading

Posted in Administration, apex, Profile, salesforce, Uncategorized | Tagged , , , , , , , , , | Leave a comment

Salesforce: how to check if profile is custom or standard by code

When I needed to grant access to some object to all profiles I understood how is it possible to  profile is custom or standard by code   public static Boolean isStandardProfile( String profileName ) { List<PermissionSet> ps = [ select id … Continue reading

Posted in Profile, salesforce, User Management | Tagged , , , , | Leave a comment

Salesforce Developer way of granting access to SObject to all profiles

Recently I have described a point-and-clicking way to grant access to SObject to all profiles. It is interesting that there is another way is for Salesforce Developers, which is shorter and concise. You can just open Developer Console and copy … Continue reading

Posted in Profile, salesforce, User Management | Tagged , , , , , , | Leave a comment

Salesforce Administrator way of granting access to SObject to all profiles

There are two ways of granting access to an object to every single profile in organization. In this post I will describe the first possible way which is useful for Salesforce Administrators since this way doesn’t need to write any … Continue reading

Posted in Administration, Posts in English, Profile, Uncategorized, User Management | Tagged , , , , , , | Leave a comment