Custom Object - Deploying to Sandbox - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
SyphersSyphers 

Custom Object - Deploying to Sandbox

I am trying to deploy a custom object from the sandbox and am getting the following error message.  I have the Account set as Master-Detail(Account), so I don't understand why the deployment is failing.

Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field
Avinash VatsyaAvinash Vatsya

To avoid getting this error, add the master detail field (even if it has not been changed) to your deployment and the error will not occur anymore.
The custom fields of that custom object to be added as well to the change set.
Arti KulkarniArti Kulkarni
Solution to this could be to add the "MasterDetail relationship field" into the change set, even if you haven't changed it or the Sharing / OWD.