How to get object sharing setting on Organization-Wide Defaults (OWD) using Apex?

How to get object sharing setting on Organization-Wide Defaults (OWD) using Apex?

Use the below query for Standard objects.

SOQL:

SELECT Id, DefaultAccountAccess, DefaultContactAccess, DefaultLeadAccess, DefaultOpportunityAccess FROM Organization

Leave a Reply