0

I have set up this structure of metadata to be deployed as a pre step, before I can push the main code. Please note that this package is dependent on another package, which is already deployed.

enter image description here

And this is the content of package.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>hed__Affiliation__c.Annual_Income__c</members>
        <members>hed__Affiliation__c.Degree_Type__c</members>
        <members>hed__Affiliation__c.hed__Role__c</members>
        <members>hed__Affiliation__c.hed__Status__c</members>
        <members>hed__Affiliation__c.Transcript_Status__c</members>
        <members>hed__Affiliation__c.Upsert_Key__c</members>
        <name>CustomField</name>
    </types>
    <types>
        <members>hed__Affiliation__c.Employer</members>
        <members>hed__Affiliation__c.Previous_Institution</members>
        <name>RecordType</name>
    </types>
    <version>55.0</version>
</Package>

When I try to run this command:

cci task run deploy_pre --org dev

I see this error:

[Failed]: Update of None hed__Affiliation__c.Annual_Income__c: Error: An object 'hed__Affiliation__c.Annual_Income__c' of type CustomField was
named in package.xml, but was not found in zipped directory

                                                                                                                                                                    ... ...                                                               

                                                                                                                                                                   
                Update of None hed__Affiliation__c.hed__Status__c: Error: An object 'hed__Affiliation__c.hed__Status__c' of type

CustomField was named in
package.xml, but was not found in zipped directory

                Update of None hed__Affiliation__c.Upsert_Key__c: Error: An object 'hed__Affiliation__c.Upsert_Key__c' of type

CustomField was named in
package.xml, but was not found in zipped directory
... ...

                Update of None hed__Affiliation__c.Transcript_Status__c: Error: An object

'hed__Affiliation__c.Transcript_Status__c' of type CustomField was named in package.xml, but was not found in zipped directory

Am I missing anything? If the code is in MDAPI format, then it works fine, but not in SFDX format. Do I need to add some config?

1 Answer 1

0

You need to remove some config. package.xml is unnecessary in source format. However, if you wanted or needed it to be compatible in both API modes, I'd suggest that the error you're getting is related to where the package.xml is. It appears to be in unpackaged/pre/eda-customizations/objects, but it needs to be in unpackaged/pre/eda-customizations. By including the file at the wrong location, the API thinks that hed__Affiliation__c is the root of the package you're trying to deploy. Try moving it up one directory level and see if that solves your problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .