Own sharing model with a Master-Detail field
Detection
- RegExp:
Error (.*) Cannot set sharingModel to (\w+) on a CustomObject with a MasterDetail relationship field
Examples
Error Invoice_Line__c Cannot set sharingModel to ReadWrite on a CustomObject with a MasterDetail relationship field
Resolution
{1} has a Master-Detail field, so its sharing model must be ControlledByParent.
- Set <sharingModel>ControlledByParent</sharingModel> (and <externalSharingModel>) in the object file of {1}
- Or change the Master-Detail field into a Lookup first, if {1} needs its own sharing model