Cli: `sfdx force:source:push` will not push changes to detail object alone in M-D relationship

Created on 7 Feb 2019  ยท  6Comments  ยท  Source: forcedotcom/cli

Summary

Given an object Project__c with a master-detail relationship to Account (relationship field name Account__c), with a local project tree and scratch org in sync with one another:

Make a local change to the file Project__c.object, such as changing the label of the Name field.

Issue

$ sfdx force:source:push

Receive in response

PROJECT PATH ERROR
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
force-app/main/default/objects/Project__c/Project__c.object-meta.xml Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field

Note that the sharingModel is set to ControlledByParent and the master-detail relationship field is present both in the source tree and in the scratch org - it's just not being pushed in this operation because that field is not changed.

SFDX CLI Version: confirmed in 6.50.0 and 6.51.1 (linux-x64) node-v10.15.0

OS and version: GalliumOS (Ubuntu derivative) 16.04

bug owned by another team tracked elsewhere

Most helpful comment

Hi, @clairebianchi: would you happen to know where this is being tracked?

All 6 comments

@davidmreed Thank you for filing this bug. We are now aware and I have passed it on to the correct internal team.

Is there any update when this might get fixed? Seems this is related to this which is a really bad workaround.

Hi, @clairebianchi: would you happen to know where this is being tracked?

Temporarily to rename the master-detail field label on the child object to fix the push issue.

Why is this closed? I am hitting this issue as well that if any change happens to the object definition, push fails unless you also update the master detail field so it has changes as well.

sfdx-cli/7.81.0-7b953c80d1 darwin-x64 node-v12.18.3
@mavens/mic-cli-plugin 10.0.0-0 (link) /Users/kaiamundsen/workspace/MedInfoCloud-CLI-Plugin
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.1 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-scanner 2.4.0
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.3 (core)
analytics 1.12.1 (core)
auth 1.3.0 (core)
config 1.2.1 (core)
generator 1.1.3 (core)
salesforcedx 50.6.0 (core)
โ”œโ”€ schema 1.0.1 (core)
โ”œโ”€ custom-metadata 1.0.10 (core)
โ”œโ”€ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
โ”œโ”€ salesforce-alm 50.6.0 (core)
โ”œโ”€ apex 0.1.4 (core)
โ””โ”€ templates 50.1.0 (core)
sfdmu 3.7.21
sfdx-cli 7.81.0 (core)
texei-sfdx-plugin 1.9.1

Seeing the same issue here. Any modifications to the object fails with

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

sfdx-cli/7.85.1-2fb9e41053 darwin-x64 node-v12.18.3

Was this page helpful?
0 / 5 - 0 ratings