Skip to content

[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's set #3663

Description

@henrysmid

Before You Submit

  • I'm using the latest version of Salesforce CLI
  • I've searched the existing issues
  • I've run sf doctor to diagnose common issues

Related Issue

No response

Command

sf package version create

Org Type

Developer Edition

Did this work before?

Yes, this is a regression

Last Working Version

No response

Summary

sf package version create prints this warning on every run:

Warning: Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the org-capitalize-record-types config var to true to enforce capitalization.

Setting the config var doesn't stop it, because package creation never reads the config var. The same happens when the definitionfile has no objectSettings or record types at all.

Repository to Reproduce

No response

Steps to reproduce

  1. sf config set org-capitalize-record-types=true (or set SF_CAPITALIZE_RECORD_TYPES=true)
  2. Use any scratch org definition file, even one with no objectSettings
  3. sf package version create -p -v -x -w 60

Expected Result

No warning when org-capitalize-record-types is set. The setting should also apply to how the build org is created, as it does for sf org create scratch.

Actual Result

The warning appears every time, and the setting is ignored. The build org always uses the hardcoded fallback (true).

System Information

- @salesforce/cli/2.152.14 win32-x64 node-v24.20.0
- @salesforce/plugin-packaging 3.0.7
- @salesforce/packaging 5.0.12
- @salesforce/core 9.2.0
- Windows 11, PowerShell 7

Additional Information

Cause

@salesforce/packaging creates the settings generator without passing the setting:

// @salesforce/packaging 5.0.12 — lib/package/packageVersionCreate.js:339
const settingsGenerator = new core_1.ScratchOrgSettingsGenerator({ asDirectory: true });

packageConvert.js:185 does the same thing. In @salesforce/core, the ScratchOrgSettingsGenerator constructor warns whenever capitalizeRecordTypes is undefined:

// @salesforce/core 9.2.0 — lib/org/scratchOrgSettingsGenerator.js:200
if (options?.capitalizeRecordTypes === undefined) {
void Lifecycle.getInstance().emitWarning(messages.getMessage('noCapitalizeRecordTypeConfigVar'));
this.capitalizeRecordTypes = true;
}

Suggested fix: in both packaging call sites, read org-capitalize-record-types from the ConfigAggregator and pass it as capitalizeRecordTypes, the same way scratch org creation does.

Related: #2633 introduced the config var; #2970 shows the warning in an unrelated package version create report.

Screenshots or Log Files

No response

Activity

  1. added
    owned by another teamThe Salesforce CLI team does not own this work but will pass on the information to the correct team.
    regressionIssue that regresses existing functionality
    on Oct 8, 2026
  2. github-actions commented on Oct 8, 2026

    @github-actions

    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.

  3. github-actions commented on Oct 8, 2026

    @github-actions

    Hello @henrysmid 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
    Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

    A few more things to check:

    • Make sure you've provided detailed steps to reproduce your issue.
      • A repository that clearly demonstrates the bug is ideal.
    • Make sure you've installed the latest version of Salesforce CLI. (docs)
      • Better yet, try the rc or nightly versions. (docs)
    • Try running the doctor command to diagnose common issues.
    • Search GitHub for existing related issues.

    Thank you!

  4. added
    more information requiredIssue requires more information or a response from the customer
    and removed
    investigatingWe're actively investigating this issue
    on Oct 8, 2026
  5. git2gus commented on Oct 8, 2026

    @git2gus

    This issue has been linked to a new work item: W-24454118

  6. henrysmid commented on Oct 8, 2026

    @henrysmid
    Author

    CLI version is 2.152.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagingmore information requiredIssue requires more information or a response from the customerowned by another teamThe Salesforce CLI team does not own this work but will pass on the information to the correct team.regressionIssue that regresses existing functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions