I have setup three sfdx second gen packages, each with their own sub folder in my umbrella project folder.
Package 1 defines some Custom Objects.
Package 2 adds some custom fields to the custom objects created by Package 1.
Package 3 holds nothing at the moment.
My sfdx-project.json
lists Package 1 as a dependency for Package 2.
When I do a sfdx force:source:push
it appears to successfully deploy, but the fields in the org defined by Package 2 are missing. If I change my sfdx-project.json
file to list only Package 2, without any dependencies, and clear out my .sfdx/org
subfolder, a sfdx force:org:push
results in the following errors for my custom fields:
N/A An object 'TP_Transaction__c.TX_VP_BillingEmail__c' of type CustomField was named in package.xml, but was not found in zipped direc
tory
There a multiple errors as above, for each custom field defined in Package 2. The initial push with the full project configuration also listed the fields from Package 2 as added.
Based on the error above it looks like the sfdx cli is creating a MDAPI package.xml
correctly listing the custom fields, but not including the old MDAPI CustomObject XML including the fields.
Has anyone else worked around this? Any suggestions for next steps to troubleshoot?
I want to keep our data model fields coupled to the domain that deals with them. This doesn't seem possible currently.