Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf cli not retrieving custommetadata records #2652

Closed
junners opened this issue Jan 18, 2024 · 4 comments
Closed

sf cli not retrieving custommetadata records #2652

junners opened this issue Jan 18, 2024 · 4 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@junners
Copy link

junners commented Jan 18, 2024

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Running sf project retrieve start -m CustomMetadata -o <org> does not retrieve any custom metadata record

Steps To Reproduce

  1. from an existing sfdx project, auth an org.
  2. manually create a custom metadata and custom metadata record
  3. run sf project retrieve start -m CustomMetadata -o <org>
  4. -- returns warning nothing is retrieved --

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Expected result

Metadata will be retrieved, for existing metadata- it should go to the appropriate package directory, if not existing in another package directory, it goes to the default.

Actual result

Actual Result

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.24.4",
  "nodeVersion": "node-v20.11.0",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/jun.jose/.nvm/versions/node/v20.11.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.0 (core)",
    "@oclif/plugin-help 6.0.10 (core)",
    "@oclif/plugin-not-found 3.0.8 (core)",
    "@oclif/plugin-plugins 4.1.15 (core)",
    "@oclif/plugin-search 1.0.11 (core)",
    "@oclif/plugin-update 4.1.7 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.14 (core)",
    "@salesforce/cli 2.24.4 (core)",
    "apex 3.0.17 (core)",
    "auth 3.2.0 (core)",
    "data 3.0.14 (core)",
    "deploy-retrieve 3.1.0 (core)",
    "dev 0.7.9 (user)",
    "info 3.0.15 (core)",
    "limits 3.1.2 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.2.2 (core)",
    "packaging 1.22.2 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.15 (core)",
    "sobject 1.1.0 (core)",
    "source 3.1.3 (core)",
    "telemetry 3.1.9 (core)",
    "templates 56.0.9 (core)",
    "trust 3.3.1 (core)",
    "user 3.2.1 (core)",
    "@salesforce/sfdx-scanner 3.13.0 (user)",
    "plauti-sfdx 0.0.5 (user)"
  ]
}

Additional information

dev-debug-log.log

@junners junners added the investigating We're actively investigating this issue label Jan 18, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 18, 2024
@shetzel
Copy link
Contributor

shetzel commented Jan 18, 2024

I'm not able to reproduce this following your steps. After I create the custom metadata type and record, then retrieve:

sf project retrieve start -m CustomMetadata
Retrieving v59.0 metadata from test-smecxjfdvipn@example.com using the v60.0 SOAP API
Preparing retrieve request... Succeeded

Retrieved Source
==============================================================================================================================
| State   Name                      Type           Path
| ─────── ───────────────────────── ────────────── ───────────────────────────────────────────────────────────────────────────
| Created TestCMeta.TestCMetaRecord CustomMetadata force-app/main/default/customMetadata/TestCMeta.TestCMetaRecord.md-meta.xml

@shetzel
Copy link
Contributor

shetzel commented Jan 18, 2024

I would check the .forceignore in your project to make sure there isn't an entry that would cause CustomMetadata files to be ignored. E.g., intending to ignore markdown files with an entry of /*.md or something similar could match .../TestCMeta.TestCMetaRecord.md-meta.xml

@junners
Copy link
Author

junners commented Jan 18, 2024 via email

@shetzel shetzel closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants