question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

2reactions
jefersonchavescommented, Jul 13, 2020

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

1reaction
yippiecommented, Dec 2, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

'sfdx force:source:push' will not push changes to detail object ...
Summary 'sfdx force:source:push' will not push changes to detail object alone in M-D relationship Β· Repro 1. Create an object A . 2....
Read more >
SFDX Push Error - You cannot add a master-detail ...
The error is caused by a custom field on a custom object. You cannot add a master-detail relationship to a managed custom object....
Read more >
Twitter-এ Jason Roberts: "'sfdx force:source:push' will not push ...
'sfdx force:source:push' will not push changes to detail object alone in M-D relationship https://sforce.co/2UP5Nhc Β· ৩:১২ PM Β· ২৩ এΰ¦ͺ্রিল,Β ...
Read more >
Lightning Aura Components Developer Guide
Go beyond this guide with exciting Trailhead content. To explore more of what you can do with Lightning Components, go to:.
Read more >
Deploy metadata from Scratch Org to Sandbox/Production ...
Hello Trailblazers, In this video, we're going to learn how we can convert metadata from source format to metadata format so that we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found