Cli: Only First Custom field mentioned in Package.xml is getting deployed. Rest of the fields are ignored.

Created on 4 Oct 2020  路  11Comments  路  Source: forcedotcom/cli

While deploying multiple custom fields of same object using package.xml it is deploying only the field mentioned on the top. Rest of the fields are ignored.

Steps To Reproduce:

  1. In my Repository I have two fields which i have deleted from the target org. Below is my package.xml
    image

  2. When I deploy this package.xml, it is just deploying the first field - Short_Name__c and the second one was ignored.
    image

Expected result

Both Custom Fields mentioned in package.xml should get deployed.

Actual result

Only one custom field mentioned on the top was deployed.
image
image

Additional information

Version: 1.49.3 (user setup)
Commit: 2af051012b66169dde0c4dfae3f5ef48f787ff69
Date: 2020-10-02T17:57:01.595Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18362
image

This is a major issue and will affect production deployments. Kindly fix this ASAP.

Thanks,
Rahul Kapoor

Most helpful comment

Fix will be in the upcoming release this Saturday.

All 11 comments

I think is related to #653

I've noticed the same issue, sfdx force:source:deploy -x seems to deploy only the first field (or first field per object?) listed in the CustomField type of the package.xml

That's right, the workaround for the moment is including only the CustomObject and not the Child elements.

@shetzel - Need your inputs here. This is causing issues in our production deployments.

Yes, I'm seeing the same thing. I'll get a fix asap. Sorry for the incomplete fix.

@shetzel - Still with the latest CLI, the issue is not resolved.

Fix will be in the upcoming release this Saturday.

Will this fix we released today?

@shetzel I can confirm that the issue with fields is gone with the new version (at least I wasn't able to reproduce it when it comes to deploying custom fields).

However I now face a similar issue with RecordTypes. Could it be the same cause?

@mehdisfdc - I don't see the problem with RecordTypes. The fix should apply to all child types of CustomObject. I created 2 record types in an org, pulled them, then made changes and deployed them without a problem. I also converted them successfully too.
E.g.,
sfdx force:source:deploy -m RecordType:Schools__c.MyFirstRT,RecordType:Schools__c.MySecondRT

@shetzel Thanks for the fix.

Was this page helpful?
0 / 5 - 0 ratings