1

How can I get in my service class(Apex class) that a logged in user is having view all and modify all permissions on any particular object.

1

You can query the permissionsetassignment object to determine if a user has PermissionsViewAllData or PermissionsModifyAllData (I believe, check the documentation). See https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_permissionsetassignment.htm for more information.

Edit: You can also query for specific objects. The items mentioned above are the global permissions.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.