I'm trying to run the following code:
cci task run deploy --path force-app\main\default\objects\ExpensivePackage__Their_Custom_Object__c --org my_scratch_org_alias
Against an ExpensivePackage__Their_Custom_Object__c
folder that looks like this:
.
├── fields
│ └── My_Custom_Field__c.field-meta.xml
└── ExpensivePackage__Their_Custom_Object__c.object-meta.xml
I tried deploying it without the object definition, but Salesforce yelled at me because the definition of My_Custom_Field__c
included <trackHistory>true</trackHistory>
.
Update of CustomField ExpensivePackage__Their_Custom_Object__c.My_Custom_Field__c: Error on line 3, col 13: The entity: ExpensivePackage__Their_Custom_Object__c does not have
history tracking enabled
If I add an object definition and just do this for its body:
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<enableHistory>true</enableHistory>
</CustomObject>
I get errors like:
Update of CustomObject ExpensivePackage__Their_Custom_Object__c: Error: Must specify a non-empty label for the CustomObject
Or if I add a dummy label (not really something I want to do, lest I accidentally deploy it to production one day when the package has changed ... I'd rather leave label-setting to the managed package!)
Update of CustomObject ExpensivePackage__Their_Custom_Object__c: Error: Must specify a non-empty plural label for the CustomObject
Or if I dummy plural-label it:
Update of CustomObject ExpensivePackage__Their_Custom_Object__c: Error: Must specify a nameField of type Text or AutoNumber
What do I need to do to get <enableHistory>true</enableHistory>
for ExpensivePackage__Their_Custom_Object__c
deployed into my existing scratch org, which has that package installed, and not putz around with things I have no business touching?
(Note: if this isn't easy to get to work with a command that deploys files I'm just playing with into an existing scratch org, I'm open to wiping it out & rebuilding it. It takes 30 minutes to install all the packages, but if it works, it works.)