You need to sign in to do that
Don't have an account?

Provide Object permission using data loader
In our product we have 250+ objects and 16+ profiles. I was given an assignment to prepare automation logic to provide profile level permissions to all these objects.
After all search on internert and salesforce guides was able to generate query which can be used to extract and update permissions using Apex data loader.
Below are my findings and if anyone looking for help:
To extract object permissions of all profiles:
Ref Links: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_permissionset.htm
Thanks
Yashita
After all search on internert and salesforce guides was able to generate query which can be used to extract and update permissions using Apex data loader.
Below are my findings and if anyone looking for help:
- To get all custom profile ID from target org. Extract them using below query:
Select Id,ProfileId,Profile.Name from PermissionSet where IsOwnedByProfile=true and isCustom=trueThis query will extract all custom profile from the org.
To extract object permissions of all profiles:
SELECT Id, SObjectType, ParentId, Parent.ProfileId, Parent.Profile.Name, PermissionsCreate, PermissionsRead, PermissionsEdit, PermissionsDelete, PermissionsModifyAllRecords,PermissionsViewAllRecords FROM ObjectPermissions WHERE SobjectType = '<Specify Object API Name>' and parentid in (select Id from PermissionSet where PermissionSet.ProfileId IN ('<Specify Profile IDs>'))You can much more, like Field permission, mass profile assignment to user.
Ref Links: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_permissionset.htm
Thanks
Yashita
SELECT ParentId,PermissionsCreate,PermissionsDelete,PermissionsEdit,PermissionsModifyAllRecords,PermissionsRead,PermissionsViewAllRecords,SobjectType FROM ObjectPermissions where parentid='target parentid' AND sobjecttype in 'APTS_Setting__c'