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
When I try to deploy to a scratch org, deploy fails due to "missing" BusinessProcess/record types missing BusinessProcess. This is despite them being defined, being individually deployed, being deployed together, being defined in manifest and retrieved using manifest (everything retrieved except BusinessProcess), etc. These "don't exist" unless I query - which they return fine using sf data query so these definitely exist in all our orgs.
Against our prod/sandboxes org I cant pull certain metadata that should be in CustomObject (if I'm reading their docs right). The issue is w/ sf project retrieve start -m BusinessProcess -o <any-org>. BusinessProcess should live under RecordType (which returns empty for my retrieves as well, have to use CustomObject).
It seems like BusinessProcess may have been moved out of metadata api and into CustomObject, but despite being defined in the xml. The one thing I noticed is the picklist values from Support Process or Sales Process (which are BusinessProcess) are not in the RecordType picklist. Even if I manually add the name of process and values, they do not pull that way or pulling down new CustomObject metadata. The only reference is 3rd property which doesn't pull anything into force-app for any BusinessProcess related to any object Case/Lead for us. XML Snippet:
<?xml version="1.0" encoding="UTF-8"?>
<RecordType xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Some_Name</fullName>
<active>true</active>
<businessProcess>Some Process</businessProcess> // or Some_Process
<label>Some Label</label>
<picklistValues>
</picklistValues>
</RecordType>
PS C:\Users\MatthewMowris\swh> sf data query --query 'SELECT Name FROM BusinessProcess' -o devhub
┌────────────────────┐
│ NAME │
├────────────────────┤
│ Default │
│ TMDA │
│ VACI │
│ VACI Coaching │
│ VACI Claim Process │
└────────────────────┘
Total number of records retrieved: 5.
Querying Data... done
PS C:\Users\MatthewMowris\swh> sf project retrieve start -m BusinessProcess -o devhub
────────────── Retrieving Metadata ──────────────
Retrieving v62.0 metadata from mmowris@servedwithhonor.com using the v63.0 SOAP API
:heavy_check_mark: Preparing retrieve request 9ms
:heavy_check_mark: Sending request to org 226ms
:heavy_check_mark: Waiting for the org to respond 7.18s
:heavy_check_mark: Done 0ms
Status: Succeeded
Elapsed Time: 7.41s
» Warning: Nothing retrieved
PS C:\Users\MatthewMowris\swh>
Tip
use sf doctor --create-issue to automatically fill the required information
Expected result
This should pull a business process
Actual result
no records found
Additional information
System Information
powershell and bash
{
"architecture" : " win32-x64" ,
"cliVersion" : " @salesforce/cli/2.81.9" ,
"nodeVersion" : " node-v22.14.0" ,
"osVersion" : " Windows_NT 10.0.26100" ,
"rootPath" : " C:\U sers\M atthewMowris\A ppData\L ocal\s f\c lient\2 .81.9-b9aef0c" ,
"shell" : " C:\P rogram Files\G it\u sr\b in\b ash.exe" ,
"pluginVersions" : [
" @oclif/plugin-autocomplete 3.2.26 (core)" ,
" @oclif/plugin-commands 4.1.22 (core)" ,
" @oclif/plugin-help 6.2.27 (core)" ,
" @oclif/plugin-not-found 3.2.47 (core)" ,
" @oclif/plugin-plugins 5.4.36 (core)" ,
" @oclif/plugin-search 1.2.23 (core)" ,
" @oclif/plugin-update 4.6.35 (core)" ,
" @oclif/plugin-version 2.2.26 (core)" ,
" @oclif/plugin-warn-if-update-available 3.1.38 (core)" ,
" @oclif/plugin-which 3.2.34 (core)" ,
" @salesforce/cli 2.81.9 (core)" ,
" apex 3.6.10 (core)" ,
" api 1.3.3 (core)" ,
" auth 3.6.106 (core)" ,
" data 4.0.22 (core)" ,
" deploy-retrieve 3.21.0 (core)" ,
" info 3.4.48 (core)" ,
" limits 3.3.49 (core)" ,
" marketplace 1.3.7 (core)" ,
" org 5.5.1 (core)" ,
" packaging 2.11.0 (core)" ,
" schema 3.3.56 (core)" ,
" settings 2.4.20 (core)" ,
" sobject 1.4.53 (core)" ,
" telemetry 3.6.36 (core)" ,
" templates 56.3.41 (core)" ,
" trust 3.7.73 (core)" ,
" user 3.6.13 (core)"
]
}
Output of sf doctor
AzureAD+MatthewMowris@LAPTOP-G4393125 MINGW64 ~/swh (SD-297-Github-Enhancement-Discovery)
$ "/c/Users/MatthewMowris/AppData/Local/sf/client/bin/sf.cmd" doctor --command "project retrieve start -m BusinessProcess -o dev-sandbox" --json
{
"status" : 0 ,
"result" : {
"versionDetail" : {
"architecture" : " win32-x64" ,
"cliVersion" : " @salesforce/cli/2.81.9" ,
"nodeVersion" : " node-v22.14.0" ,
"osVersion" : " Windows_NT 10.0.26100" ,
"rootPath" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf\\ client\\ 2.81.9-b9aef0c" ,
"shell" : " C:\\ Program Files\\ Git\\ usr\\ bin\\ bash.exe" ,
"pluginVersions" : [
" @oclif/plugin-autocomplete 3.2.26 (core)" ,
" @oclif/plugin-commands 4.1.22 (core)" ,
" @oclif/plugin-help 6.2.27 (core)" ,
" @oclif/plugin-not-found 3.2.47 (core)" ,
" @oclif/plugin-plugins 5.4.36 (core)" ,
" @oclif/plugin-search 1.2.23 (core)" ,
" @oclif/plugin-update 4.6.35 (core)" ,
" @oclif/plugin-version 2.2.26 (core)" ,
" @oclif/plugin-warn-if-update-available 3.1.38 (core)" ,
" @oclif/plugin-which 3.2.34 (core)" ,
" @salesforce/cli 2.81.9 (core)" ,
" apex 3.6.10 (core)" ,
" api 1.3.3 (core)" ,
" auth 3.6.106 (core)" ,
" data 4.0.22 (core)" ,
" deploy-retrieve 3.21.0 (core)" ,
" info 3.4.48 (core)" ,
" limits 3.3.49 (core)" ,
" marketplace 1.3.7 (core)" ,
" org 5.5.1 (core)" ,
" packaging 2.11.0 (core)" ,
" schema 3.3.56 (core)" ,
" settings 2.4.20 (core)" ,
" sobject 1.4.53 (core)" ,
" telemetry 3.6.36 (core)" ,
" templates 56.3.41 (core)" ,
" trust 3.7.73 (core)" ,
" user 3.6.13 (core)"
]
},
"sfdxEnvVars" : [],
"sfEnvVars" : [
[
" SF_AUTOUPDATE_DISABLE" ,
" true"
],
[
" SF_BINPATH" ,
" C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf\\ client\\ bin\\ sf"
],
[
" SF_DISABLE_AUTOUPDATE" ,
" true"
],
[
" SF_UPDATE_INSTRUCTIONS" ,
" Use \" npm update --global @salesforce/cli\" to update npm-based installations."
]
],
"proxyEnvVars" : [],
"cliConfig" : {
"arch" : " x64" ,
"bin" : " sf" ,
"binAliases" : [
" sfdx"
],
"binPath" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf\\ client\\ bin\\ sf" ,
"cacheDir" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf" ,
"channel" : " stable" ,
"configDir" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf" ,
"dataDir" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf" ,
"dirname" : " sf" ,
"flexibleTaxonomy" : true ,
"home" : " C:\\ Users\\ MatthewMowris" ,
"isSingleCommandCLI" : false ,
"name" : " @salesforce/cli" ,
"nsisCustomization" : " scripts/nsis.nsi" ,
"platform" : " win32" ,
"root" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf\\ client\\ 2.81.9-b9aef0c" ,
"shell" : " C:\\ Program Files\\ Git\\ usr\\ bin\\ bash.exe" ,
"theme" : {
"bin" : " blueBright" ,
"command" : " blueBright" ,
"dollarSign" : " green" ,
"flag" : " green" ,
"flagDefaultValue" : " blueBright" ,
"flagOptions" : " blueBright" ,
"flagRequired" : " red" ,
"sectionHeader" : " blue" ,
"topic" : " blueBright" ,
"json" : {
"brace" : " whiteBright" ,
"bracket" : " whiteBright" ,
"comma" : " green" ,
"key" : " blueBright" ,
"string" : " greenBright" ,
"number" : " blue" ,
"boolean" : " redBright" ,
"null" : " blackBright"
}
},
"topicSeparator" : " " ,
"updateConfig" : {
"node" : {
"options" : [
" --no-deprecation"
]
},
"s3" : {
"bucket" : " dfc-data-production" ,
"host" : " https://developer.salesforce.com" ,
"templates" : {
"target" : {
"baseDir" : " <%- bin %>" ,
"manifest" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>" ,
"unversioned" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>" ,
"versioned" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>"
},
"vanilla" : {
"baseDir" : " <%- bin %>" ,
"manifest" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version" ,
"unversioned" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>" ,
"versioned" : " <%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>"
}
}
}
},
"userAgent" : " @salesforce/cli/2.81.9 win32-x64 node-v22.14.0" ,
"valid" : true ,
"version" : " 2.81.9" ,
"warned" : false ,
"windows" : true ,
"_base" : " @oclif/core@4.2.10" ,
"_commands" : {},
"_topics" : {},
"commandPermutations" : {
"validPermutations" : {}
},
"pluginLoader" : {
"options" : {
"root" : " C:\\ Users\\ MatthewMowris\\ AppData\\ Local\\ sf\\ client\\ 2.81.9-b9aef0c\\ dist"
},
"errors" : [],
"plugins" : {},
"pluginsProvided" : false
},
"topicPermutations" : {
"validPermutations" : {}
},
"nodeEngine" : " >=18.6.0"
},
"pluginSpecificData" : {
"@salesforce/plugin-deploy-retrieve" : [
{
"sourceApiVersion" : " 62.0" ,
"targetDevHubApiVersion" : " 63.0"
}
],
"@salesforce/plugin-auth" : [
{
"isUsingGenericKeychain" : true ,
"sfCryptoV2Support" : true ,
"cryptoVersion" : " v1"
}
]
},
"diagnosticResults" : [
{
"testName" : " salesforcedx plugin isn’t installed" ,
"status" : " pass"
},
{
"testName" : " you don't have any linked plugins" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-trust] can ping: https://registry.npmjs.org" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/" ,
"status" : " pass"
},
{
"testName" : " using latest or latest-rc CLI version" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion" ,
"status" : " pass"
},
{
"testName" : " can access: https://test.salesforce.com" ,
"status" : " pass"
{
"testName" : " can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-auth] CLI supports v2 crypto" ,
"status" : " pass"
},
{
"testName" : " [@salesforce/plugin-auth] CLI using stable v1 crypto" ,
"status" : " pass"
}
],
"suggestions" : [
" Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community." ,
" Check http://status.salesforce.com for general Salesforce availability and performance." ,
" using npm registry https://registry.npmjs.org/ from npm config"
],
"logFilePaths" : [
" C:\\ Users\\ MatthewMowris\\ swh\\ 1743431236457-command-stdout.log" ,
" C:\\ Users\\ MatthewMowris\\ swh\\ 1743431236457-command-debug.log" ,
" C:\\ Users\\ MatthewMowris\\ swh\\ 1743431236457-diagnosis.json" ,
" C:\\ Users\\ MatthewMowris\\ swh\\ 1743431236457-diagnosis.json"
],
"commandExitCode" : 0 ,
"commandName" : " sf project retrieve start -m BusinessProcess -o dev-sandbox --dev-debug"
},
"warnings" : []
}
Summary
When I try to deploy to a scratch org, deploy fails due to "missing"
BusinessProcess/record types missingBusinessProcess. This is despite them being defined, being individually deployed, being deployed together, being defined in manifest and retrieved using manifest (everything retrieved exceptBusinessProcess), etc. These "don't exist" unless I query - which they return fine using sf data query so these definitely exist in all our orgs.Against our prod/sandboxes org I cant pull certain metadata that should be in
CustomObject(if I'm reading their docs right). The issue is w/sf project retrieve start -m BusinessProcess -o <any-org>.BusinessProcessshould live underRecordType(which returns empty for my retrieves as well, have to useCustomObject).It seems like
BusinessProcessmay have been moved out of metadata api and intoCustomObject, but despite being defined in the xml. The one thing I noticed is the picklist values from Support Process or Sales Process (which areBusinessProcess) are not in theRecordTypepicklist. Even if I manually add the name of process and values, they do not pull that way or pulling down newCustomObjectmetadata. The only reference is 3rd property which doesn't pull anything intoforce-appfor anyBusinessProcessrelated to any object Case/Lead for us. XML Snippet:Tip
use
sf doctor --create-issueto automatically fill the required informationExpected result
This should pull a business process
Actual result
no records found
Additional information
System Information
powershell and bash
{ "architecture": "win32-x64", "cliVersion": "@salesforce/cli/2.81.9", "nodeVersion": "node-v22.14.0", "osVersion": "Windows_NT 10.0.26100", "rootPath": "C:\Users\MatthewMowris\AppData\Local\sf\client\2.81.9-b9aef0c", "shell": "C:\Program Files\Git\usr\bin\bash.exe", "pluginVersions": [ "@oclif/plugin-autocomplete 3.2.26 (core)", "@oclif/plugin-commands 4.1.22 (core)", "@oclif/plugin-help 6.2.27 (core)", "@oclif/plugin-not-found 3.2.47 (core)", "@oclif/plugin-plugins 5.4.36 (core)", "@oclif/plugin-search 1.2.23 (core)", "@oclif/plugin-update 4.6.35 (core)", "@oclif/plugin-version 2.2.26 (core)", "@oclif/plugin-warn-if-update-available 3.1.38 (core)", "@oclif/plugin-which 3.2.34 (core)", "@salesforce/cli 2.81.9 (core)", "apex 3.6.10 (core)", "api 1.3.3 (core)", "auth 3.6.106 (core)", "data 4.0.22 (core)", "deploy-retrieve 3.21.0 (core)", "info 3.4.48 (core)", "limits 3.3.49 (core)", "marketplace 1.3.7 (core)", "org 5.5.1 (core)", "packaging 2.11.0 (core)", "schema 3.3.56 (core)", "settings 2.4.20 (core)", "sobject 1.4.53 (core)", "telemetry 3.6.36 (core)", "templates 56.3.41 (core)", "trust 3.7.73 (core)", "user 3.6.13 (core)" ] }Output of
sf doctorAzureAD+MatthewMowris@LAPTOP-G4393125 MINGW64 ~/swh (SD-297-Github-Enhancement-Discovery)
$ "/c/Users/MatthewMowris/AppData/Local/sf/client/bin/sf.cmd" doctor --command "project retrieve start -m BusinessProcess -o dev-sandbox" --json
{ "status": 0, "result": { "versionDetail": { "architecture": "win32-x64", "cliVersion": "@salesforce/cli/2.81.9", "nodeVersion": "node-v22.14.0", "osVersion": "Windows_NT 10.0.26100", "rootPath": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf\\client\\2.81.9-b9aef0c", "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe", "pluginVersions": [ "@oclif/plugin-autocomplete 3.2.26 (core)", "@oclif/plugin-commands 4.1.22 (core)", "@oclif/plugin-help 6.2.27 (core)", "@oclif/plugin-not-found 3.2.47 (core)", "@oclif/plugin-plugins 5.4.36 (core)", "@oclif/plugin-search 1.2.23 (core)", "@oclif/plugin-update 4.6.35 (core)", "@oclif/plugin-version 2.2.26 (core)", "@oclif/plugin-warn-if-update-available 3.1.38 (core)", "@oclif/plugin-which 3.2.34 (core)", "@salesforce/cli 2.81.9 (core)", "apex 3.6.10 (core)", "api 1.3.3 (core)", "auth 3.6.106 (core)", "data 4.0.22 (core)", "deploy-retrieve 3.21.0 (core)", "info 3.4.48 (core)", "limits 3.3.49 (core)", "marketplace 1.3.7 (core)", "org 5.5.1 (core)", "packaging 2.11.0 (core)", "schema 3.3.56 (core)", "settings 2.4.20 (core)", "sobject 1.4.53 (core)", "telemetry 3.6.36 (core)", "templates 56.3.41 (core)", "trust 3.7.73 (core)", "user 3.6.13 (core)" ] }, "sfdxEnvVars": [], "sfEnvVars": [ [ "SF_AUTOUPDATE_DISABLE", "true" ], [ "SF_BINPATH", "C:\\Users\\MatthewMowris\\AppData\\Local\\sf\\client\\bin\\sf" ], [ "SF_DISABLE_AUTOUPDATE", "true" ], [ "SF_UPDATE_INSTRUCTIONS", "Use \"npm update --global @salesforce/cli\" to update npm-based installations." ] ], "proxyEnvVars": [], "cliConfig": { "arch": "x64", "bin": "sf", "binAliases": [ "sfdx" ], "binPath": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf\\client\\bin\\sf", "cacheDir": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf", "channel": "stable", "configDir": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf", "dataDir": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf", "dirname": "sf", "flexibleTaxonomy": true, "home": "C:\\Users\\MatthewMowris", "isSingleCommandCLI": false, "name": "@salesforce/cli", "nsisCustomization": "scripts/nsis.nsi", "platform": "win32", "root": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf\\client\\2.81.9-b9aef0c", "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe", "theme": { "bin": "blueBright", "command": "blueBright", "dollarSign": "green", "flag": "green", "flagDefaultValue": "blueBright", "flagOptions": "blueBright", "flagRequired": "red", "sectionHeader": "blue", "topic": "blueBright", "json": { "brace": "whiteBright", "bracket": "whiteBright", "comma": "green", "key": "blueBright", "string": "greenBright", "number": "blue", "boolean": "redBright", "null": "blackBright" } }, "topicSeparator": " ", "updateConfig": { "node": { "options": [ "--no-deprecation" ] }, "s3": { "bucket": "dfc-data-production", "host": "https://developer.salesforce.com", "templates": { "target": { "baseDir": "<%- bin %>", "manifest": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>", "unversioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>", "versioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>" }, "vanilla": { "baseDir": "<%- bin %>", "manifest": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version", "unversioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>", "versioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>" } } } }, "userAgent": "@salesforce/cli/2.81.9 win32-x64 node-v22.14.0", "valid": true, "version": "2.81.9", "warned": false, "windows": true, "_base": "@oclif/core@4.2.10", "_commands": {}, "_topics": {}, "commandPermutations": { "validPermutations": {} }, "pluginLoader": { "options": { "root": "C:\\Users\\MatthewMowris\\AppData\\Local\\sf\\client\\2.81.9-b9aef0c\\dist" }, "errors": [], "plugins": {}, "pluginsProvided": false }, "topicPermutations": { "validPermutations": {} }, "nodeEngine": ">=18.6.0" }, "pluginSpecificData": { "@salesforce/plugin-deploy-retrieve": [ { "sourceApiVersion": "62.0", "targetDevHubApiVersion": "63.0" } ], "@salesforce/plugin-auth": [ { "isUsingGenericKeychain": true, "sfCryptoV2Support": true, "cryptoVersion": "v1" } ] }, "diagnosticResults": [ { "testName": "salesforcedx plugin isn’t installed", "status": "pass" }, { "testName": "you don't have any linked plugins", "status": "pass" }, { "testName": "[@salesforce/plugin-trust] can ping: https://registry.npmjs.org", "status": "pass" }, { "testName": "[@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com", "status": "pass" }, { "testName": "[@salesforce/plugin-trust] can ping: https://registry.npmjs.org/", "status": "pass" }, { "testName": "using latest or latest-rc CLI version", "status": "pass" }, { "testName": "[@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion", "status": "pass" }, { "testName": "can access: https://test.salesforce.com", "status": "pass" { "testName": "can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest", "status": "pass" }, { "testName": "[@salesforce/plugin-auth] CLI supports v2 crypto", "status": "pass" }, { "testName": "[@salesforce/plugin-auth] CLI using stable v1 crypto", "status": "pass" } ], "suggestions": [ "Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community.", "Check http://status.salesforce.com for general Salesforce availability and performance.", "using npm registry https://registry.npmjs.org/ from npm config" ], "logFilePaths": [ "C:\\Users\\MatthewMowris\\swh\\1743431236457-command-stdout.log", "C:\\Users\\MatthewMowris\\swh\\1743431236457-command-debug.log", "C:\\Users\\MatthewMowris\\swh\\1743431236457-diagnosis.json", "C:\\Users\\MatthewMowris\\swh\\1743431236457-diagnosis.json" ], "commandExitCode": 0, "commandName": "sf project retrieve start -m BusinessProcess -o dev-sandbox --dev-debug" }, "warnings": [] }