Posts

Showing posts with the label OWD

Salesforce Fact #930 | Need to be careful while changing OWD to Public Read/Write

If we have used the share object of any custom object in apex or flow logic, we need to be careful while changing its OWD to Public Read/Write. While changing the OWD it won't show any reference error and trying to run the logic afterwards would show the below error: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: AccessLevel (trivial share level Read, for organization with default level Edit): [AccessLevel]

Salesforce Fact #920 | Query OWD

We can query the OWD of standard and custom objects using EntityDefinition object. The ExternalSharingModel and InternalSharingModel fields refer to the default external and internal access respectively. Sample Query: SELECT DeveloperName, QualifiedApiName, ExternalSharingModel, InternalSharingModel FROM EntityDefinition The possible values are: Private Read -> Public Read Only Edit -> Public Read/Write ControlledByParent ControlledByCampaign

Salesforce Fact #622 | Public Read/Write/Transfer

Public Read/Write/Transfer OWD setting is only available for Case and Lead objects. It allows all users to view, edit, transfer and report on all records. Reference:  https://help.salesforce.com/s/articleView?id=sf.sharing_model_fields.htm&type=5