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


2 comments: