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

api v60.0 - sf project retrieve - Retrieve of PersonAccount record type metadata file is missing picklist from the contact's custom fields that use custom global value set #2794

Closed
jtryan0601 opened this issue Mar 28, 2024 · 3 comments
Labels
validated Version information for this issue has been validated

Comments

@jtryan0601
Copy link

jtryan0601 commented Mar 28, 2024

Summary

After executing sf project retrieve on PersonAccount record type, the metadata file is missing the picklist from contact's custom fields that use custom global value set. The issue is observable on Windows 11 with the latest version of the cli (v2.34.7)

Steps To Reproduce

  1. Spin up a dev sandbox or playground org.
  2. If not enabled, enable the Person Account from Setup.
  3. Add a Global Value Set named Occupations. Add a few picklist values to this global value set.
  4. On the Contact object, add a picklist field with API Occupation__c.
  5. Use the Occupations global value set on the Contact.Occupation__c field.
  6. Navigate to Setup > Object Manager > PersonAccount > Record Types > Occupation > Edit.
  7. Verify that all picklist values are selected.
  8. Open the terminal (or VS Code), and retrieve the PersonAccount.PersonAccount record type.
    Sample cli command: sf project retrieve start -m RecordType:PersonAccount.PersonAccount
  9. Inspect the PersonAccount.recordType-meta.xml file.

project: RecordTypeRetrieveIssue.zip

Expected result

The picklist values for Occupation__pc field exists.

Actual result

The picklist values for Occupation__pc are missing.

System Information

terminal: git bash

sf version --verbose --json

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.34.7",
  "nodeVersion": "node-v18.15.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Users\\ryant\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.13 (core)",
    "@oclif/plugin-commands 3.2.0 (core)",
    "@oclif/plugin-help 6.0.18 (core)",
    "@oclif/plugin-not-found 3.0.14 (core)",
    "@oclif/plugin-plugins 4.3.8 (core)",
    "@oclif/plugin-search 1.0.20 (core)",
    "@oclif/plugin-update 4.2.0 (core)",
    "@oclif/plugin-version 2.0.14 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.14 (core)",
    "@oclif/plugin-which 3.1.5 (core)",
    "@salesforce/cli 2.34.7 (core)",
    "apex 3.0.31 (core)",
    "auth 3.3.27 (core)",
    "data 3.1.11 (core)",
    "deploy-retrieve 3.2.35 (core)",
    "env 3.0.20 (user)",
    "info 3.0.33 (core)",
    "limits 3.1.14 (core)",
    "marketplace 1.0.29 (core)",
    "org 3.5.0 (core)",
    "packaging 2.1.12 (core)",
    "schema 3.1.9 (core)",
    "settings 2.0.31 (core)",
    "sobject 1.1.20 (core)",
    "source 3.1.22 (core)",
    "telemetry 3.1.17 (core)",
    "templates 56.0.23 (core)",
    "trust 3.3.17 (core)",
    "user 3.3.4 (core)",
    "@salesforce/sfdx-scanner 3.21.0 (user)",
    "sfdx-git-delta 5.34.0 (user)"
  ]
}
@jtryan0601 jtryan0601 added the investigating We're actively investigating this issue label Mar 28, 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 Mar 28, 2024
@WillieRuemmele
Copy link
Member

WillieRuemmele commented Apr 4, 2024

Hi @jtryan0601 - after some investigating, questions, and research I found https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_recordtype.htm, specifically the second note

Metadata API doesn’t retrieve custom picklist values on person account record types, if the picklist exists on a contact. In this case, Metadata API retrieves standard picklist values only.

so unfortunately it seems like it's a server limitation

but you might have some other options https://salesforce.stackexchange.com/questions/308283/how-to-retrieve-personaccount-field-picklist-field-value-set-with-sfdx

@WillieRuemmele WillieRuemmele removed the investigating We're actively investigating this issue label Apr 4, 2024
@tggagne
Copy link

tggagne commented Feb 7, 2025

Has anyone noticed the recordtype itself can't be retrieved from personaccount-enabled orgs?

sf project retrieve start --target-org devall -m RecordType:Account.PersonAccount --ignore-conflicts

returns the error

Warnings
┌────────────────────────┬───────────────────────────────────────────────────────────────────────────┐
│ File                   │ Problem                                                                   │
├────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ unpackaged/package.xml │ Entity of type 'RecordType' named 'Account.PersonAccount' cannot be found │
└────────────────────────┴───────────────────────────────────────────────────────────────────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants