- edited description
Failure deploying a new object that is not part of my project subscription
Deployment of a new object that is not part of my project subscription fails with “Error: Not in package.xml”.
Steps to reproduce:
- Within an existing project, create a new Test_Object__c.object file. When prompted, decline to add it to the metadata subscription
- I’ll attach a sample test object, but I believe all that is required is that the object have 1 custom field.
- Save the file, and when prompted, choose to deploy despite it being outside the metadata subscription.
- Result is:
Error:\(1, 1\) Not in package.xml
- The log from this deployment is attached.
- FWIW, I noticed that the package.xml being used only contained the CustomObject stanza, and the error message in the log is pointing to the custom field, so as a test I tried copying the object definition and the package.xml to a work directory and tried a deployment using sfdx. I got a similar error, though slightly more explicit that the problem is with the custom field. I added a wildcard custom field stanza, and the sfdx deployment succeeded.
Comments (9)
-
reporter -
reporter - attached Test_Object__c.object
-
reporter - attached package.xml.failed
- attached package.xml.success
-
reporter - edited description
-
repo owner Quick update...the issue here appears to be a quirk of the deployment API when deploying a new
CustomObject
using apackage.xml
that specifies a package name via thefullName
element. Evidently if you only include theCustomObject
type and don't say anything about the child metadata types--or at least theCustomField
type...I haven't tested more than that--it fails with an error about the fields not being in thepackage.xml
file. More research needed to get this one right. Given that the same behavior occurs via the Salesforce CLI, I'll file a bug with Salesforce. I'm not sure it makes sense to implement a workaround for this until I hear more from them. -
repo owner - edited description
-
repo owner - edited description
-
repo owner - changed status to resolved
Issue tracker grooming.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment