Posts

Showing posts with the label share object

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 #754 | Deleting share records with custom apex sharing reason

Image
While deleting share object records with apex sharing reason, if we try to delete using List<Id> it doesn't work. We can use as List<CustomShareObject> to delete the records. Attached are the screenshots.