forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
486 stars 78 forks source link

Object metadata is not retrieved if field metadata is already retrieved (custom settings) #1201

Closed pfrandsen closed 2 years ago

pfrandsen commented 3 years ago

Summary

Running the command "sfdx force:source:retrieve --loglevel fatal -m CustomObject:xyz" fails to retrieve xyz.object-meta.xml if a field on the object has already been retrieved.

Steps To Reproduce:

  1. Create a new custom setting "AMLAlarmConfiguration" (AMLAlarmConfiguration__c).
  2. Create a new field "CreateAlarmCase" (CreateAlarmCasec) on AMLAlarmConfigurationc
  3. Execute "sfdx force:source:retrieve --loglevel fatal -m CustomField:AMLAlarmConfigurationc.CreateAlarmCasec" to retrieve the field.
  4. Execute "sfdx force:source:retrieve --loglevel fatal -m CustomObject:AMLAlarmConfiguration__c" to retrieve the object.
  5. Verify that "AMLAlarmConfiguration__c.object-meta.xml" has not been rtetrieved.

Expected result

The object metadata "AMLAlarmConfiguration__c.object-meta.xml" should have been retrieved from the org.

Actual result

"AMLAlarmConfiguration__c.object-meta.xml" is not present.

Additional information

Feel free to attach a screenshot.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

sfdx-cli/7.112.1 win32-x64 node-v14.17.4

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core):

@oclif/plugin-autocomplete 0.3.0 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.2.2 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.10.1 (core) @oclif/plugin-update 1.4.0-3 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-diff 0.0.6 @salesforce/sfdx-plugin-lwc-test 0.1.7 (core) @salesforce/sfdx-trust 3.6.0 (core) alias 1.1.10 (core) apex 0.2.3 (core) auth 1.7.1 (core) config 1.2.14 (core) custom-metadata 1.0.12 (core) data 0.6.0 (core) generator 1.1.7 (core) limits 1.2.1 (core) org 1.6.7 (core) salesforce-alm 52.2.3 (core) schema 1.0.8 (core) sfdx-cli 7.112.1 (core) sfdx-git-delta 4.8.1 source 1.0.6 (core) telemetry 1.2.3 (core) templates 52.1.0 (core) user 1.4.0 (core)

OS and version:

Windows 10

iowillhoit commented 2 years ago

Hey @pfrandsen, I am unable to replicate this issue. I've tried with CLI versions 7.112.1 and 7.119.2 (latest) on a Mac and 7.119.2 on Windows. Try updating your CLI and try again. If that doesn't work, it's possible it depends on the specific settings of the Custom Setting you are using, you could share more details on how it's configured.

Screen Shot 2021-09-27 at 12 27 36 PM Screen Shot 2021-09-27 at 12 29 33 PM
no-response[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.