Skip to content

Package version create fails when setting default Case Record type & Enterprise edition build org #1981

@petter-eikeland

Description

@petter-eikeland

Summary

When specifying Default Case record type in objectSettings & setting the Edition to Enterprise in project-scratch-def.json, an error is thrown during sfdx package version create. This error is not thrown when using sfdx version 7.165.0.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

  1. Set project-scratch-def.json with the following parameters:
{
    "orgName": "Dreamhouse",
    "edition": "Enterprise",
    "language": "en_US",
    "features": ["Walkthroughs", "EnableSetPasswordInApi"],
    "settings": {
        "lightningExperienceSettings": {
            "enableS1DesktopEnabled": true
        },
        "mobileSettings": {
            "enableS1EncryptedStoragePref2": false
        }
    },
    "objectSettings": {
        "account": {
            "defaultRecordType": "Administrative"
        },
        "case": {
            "defaultRecordType": "default"
        },
        "event": {
            "defaultRecordType": "default"
        }
    }
}

  1. Create a new package using sfdx package create -n campaign-r campaign -t Unlocked -v myhuborg (does not need to contain any Case functionality. This contains only a Campaign field)
  2. Create new package version and sfdx package version create -p campaign -w 15 -x -v myhuborg -f config/project-scratch-def.json

Expected result

New package version successfully created

Actual result

➜  dreamhouse-lwc git:(main) ✗ sfdx package version create -p campaign -w 10 -x -v myhuborg -f config/project-scratch-def.json
Version create.... Create version status: Error
Error (1): Multiple errors occurred: 
(1) Case.DefaultProcess: Picklist value: New not found
    MultipleErrorsError: Multiple errors occurred: 
    (1) Case.DefaultProcess: Picklist value: New not found
    Code: 1

System Information

{
  "cliVersion": "sfdx-cli/7.190.2",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v18.14.1",
  "pluginVersions": [
    "@dxatscale/sfpowerscripts 20.26.2 (user)",
    "@eon-com/eon-sfdx 1.9.4 (user)",
    "@oclif/plugin-autocomplete 2.1.2 (core)",
    "@oclif/plugin-commands 2.2.10 (core)",
    "@oclif/plugin-help 5.2.5 (core)",
    "@oclif/plugin-not-found 2.3.20 (core)",
    "@oclif/plugin-plugins 2.3.2 (core)",
    "@oclif/plugin-search 0.0.13 (core)",
    "@oclif/plugin-update 3.1.5 (core)",
    "@oclif/plugin-version 1.2.1 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.28 (core)",
    "@oclif/plugin-which 2.2.16 (core)",
    "1commerce 0.0.10 (user)",
    "alias 2.2.2 (core)",
    "apex 2.2.0 (core)",
    "auth 2.7.1 (core)",
    "community 2.2.3 (core)",
    "config 1.5.1 (core)",
    "custom-metadata 2.1.3 (core)",
    "data 2.3.1 (core)",
    "info 2.4.4 (core)",
    "limits 2.3.5 (core)",
    "org 2.4.2 (core)",
    "packaging 1.15.0 (core)",
    "schema 2.3.1 (core)",
    "signups 1.4.3 (core)",
    "source 2.5.4 (core)",
    "telemetry 2.1.1 (core)",
    "templates 55.4.1 (core)",
    "trust 2.4.2 (core)",
    "user 2.3.2 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "sfdmu 4.26.8 (user)",
    "sfpowerkit 6.1.0 (user)"
  ],
  "osVersion": "Darwin 22.3.0",
  "shell": "zsh",
  "rootPath": "/Users/user/.local/share/sfdx/client/7.190.2-cd6cf69"
}

Additional information

This error does not occur when Edition is set to Developer in project-scratch-def.json. In addition, this error does not occur on sfdx version 7.165.0 (the one we are currently utilizing in our CI environment). We have had this error in sfdx versions 7.180+ if I'm not mistaken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue or pull request that identifies or fixes a bugowned by another teamThe Salesforce CLI team does not own this work but will pass on the information to the correct team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions