Skip to content

ControlledByParent sharing without Master-Detail field

Detection

  • RegExp: Error (.*) Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field

Examples

  • Error Invoice_Line__c Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field

Resolution

{1} is deployed with sharing model ControlledByParent, but its Master-Detail field is not in the deployment.
- With delta deployments, an item that did not change in the Pull Request is not deployed: change it in the Pull Request, or turn on useDeltaDeploymentWithDependencies (https://sfdx-hardis.cloudity.com/salesforce-devops-config-delta-deployment/)
- Or deploy the Master-Detail field in an earlier Pull Request, then {1}

Comments