Cli: Error shape/settings/FieldService.settings FieldService Not available for deploy for this organization

Created on 22 Apr 2020  路  5Comments  路  Source: forcedotcom/cli

Summary

Scratch org creation failed in latest version of CLI

Steps To Reproduce:

use below scratch org definition
````
{
"orgName": "manisfdcsfdx",
"edition": "Enterprise",
"features": ["Communities", "ServiceCloud", "API", "Sites", "AddCustomApps:30", "AddCustomTabs:30", "ForceComPlatform"],

"settings": {
"communitiesSettings": {
"enableNetworksEnabled": true
},
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
}
}

}
````
Run below CLI command:
sfdx force:org:create -f config/project-scratch-def.json -s -d 7 -a testcreate

Expected result

Scratch org should be created without any issue

Actual result

scratch org creation failed with below error
Error shape/settings/FieldService.settings FieldService Not available for deploy for this organization

Additional information

image

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.54.4-8ff9ba9cc5
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.2.3 (core)
@oclif/plugin-help 2.2.3 (core)
@oclif/plugin-not-found 1.2.3 (core)
@oclif/plugin-plugins 1.7.9 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.7.1 (core)
dependencies-cli 2.0.1 (link) C:\Plugin\dependencies-cli
generator 1.1.2 (core)
salesforcedx 48.10.1 (core)
鈹溾攢 @salesforce/sfdx-plugin-lwc-test 0.1.5 (core)
鈹溾攢 salesforcedx-templates 48.8.0 (core)
鈹斺攢 salesforce-alm 48.10.0 (core)

OS and version:
Windows 10

owned by another team

Most helpful comment

This issue still exist. deleting AppData\Local\Temp\shape\settings is just workaround. i was able to reproduce the issue and find the actual root cause.

Background:
FSL setting and package will not work in enterprise scratch properly issue . As a workaround we use developer edition for project which depends on FSL, other projects are in Enterprise edition.

package_1 (depends on FSL)

{ "orgName": "manisfdcsfdx", "edition": "Developer", "features": ["Communities", "ServiceCloud", "API", "Sites", "AddCustomApps:30", "AddCustomTabs:30", "ForceComPlatform","FieldService"], "settings": { "communitiesSettings": { "enableNetworksEnabled": true }, "lightningExperienceSettings": { "enableS1DesktopEnabled": true }, "fieldServiceSettings": { "fieldServiceOrgPref": true } } }
create scratch org
sfdx force:org:create -f config/project-scratch-def.json -s -d 7 -a package_1_org

Scratch org will be created.

Package_2
{ "orgName": "manisfdcsfdx", "edition": "Enterprise", "features": ["Communities", "ServiceCloud", "API", "Sites", "AddCustomApps:30", "AddCustomTabs:30", "ForceComPlatform"], "settings": { "communitiesSettings": { "enableNetworksEnabled": true }, "lightningExperienceSettings": { "enableS1DesktopEnabled": true } } }
create scratch org
sfdx force:org:create -f config/project-scratch-def.json -s -d 7 -a package_1_org

cli throws below error
image

Everytime we create a scratch org cli is not deleting Temp\shape folder. As a result shape generated for package_1_org was not cleared. when package_2_org creation is attempted, new shape is added to the existing folder where all the settings exist and causing the problem.

WorkAround:
deleting AppData\Local\Temp\shape\settings\FieldService.settings - Windows
Go to terminal. --> type open $TMPDIR --> Go to Shape --> settings folder-->Delete FieldService.settings - MAC

All 5 comments

issue resolved after deleting AppData\Local\Temp\shape\settings in my machine.

This issue still exist. deleting AppData\Local\Temp\shape\settings is just workaround. i was able to reproduce the issue and find the actual root cause.

Background:
FSL setting and package will not work in enterprise scratch properly issue . As a workaround we use developer edition for project which depends on FSL, other projects are in Enterprise edition.

package_1 (depends on FSL)

{ "orgName": "manisfdcsfdx", "edition": "Developer", "features": ["Communities", "ServiceCloud", "API", "Sites", "AddCustomApps:30", "AddCustomTabs:30", "ForceComPlatform","FieldService"], "settings": { "communitiesSettings": { "enableNetworksEnabled": true }, "lightningExperienceSettings": { "enableS1DesktopEnabled": true }, "fieldServiceSettings": { "fieldServiceOrgPref": true } } }
create scratch org
sfdx force:org:create -f config/project-scratch-def.json -s -d 7 -a package_1_org

Scratch org will be created.

Package_2
{ "orgName": "manisfdcsfdx", "edition": "Enterprise", "features": ["Communities", "ServiceCloud", "API", "Sites", "AddCustomApps:30", "AddCustomTabs:30", "ForceComPlatform"], "settings": { "communitiesSettings": { "enableNetworksEnabled": true }, "lightningExperienceSettings": { "enableS1DesktopEnabled": true } } }
create scratch org
sfdx force:org:create -f config/project-scratch-def.json -s -d 7 -a package_1_org

cli throws below error
image

Everytime we create a scratch org cli is not deleting Temp\shape folder. As a result shape generated for package_1_org was not cleared. when package_2_org creation is attempted, new shape is added to the existing folder where all the settings exist and causing the problem.

WorkAround:
deleting AppData\Local\Temp\shape\settings\FieldService.settings - Windows
Go to terminal. --> type open $TMPDIR --> Go to Shape --> settings folder-->Delete FieldService.settings - MAC

@manisfdcsfdx thank you for reporting. @rrmehta2 can you take a look at this issue?

Hi @clairebianchi and Rohit - I too am having apparently the same problem. Other features enable correctly but not this one.

image

Pure speculation but I'm wondering if the activation is checking for full FSL licence (which we don't have) and hence refusing to activate work orders? All the other features I can enable in the scratch org definition (which is using shape) and after creation I can log in via UI and enable this one. Just not through the definition.

Thanks!!

scratch org def:
{
"orgName": "Salesforce",
"sourceOrg": "-redacted-",
"settings": {
"surveySettings": {
"enableSurvey": true
},
"fieldServiceSettings": {
"enableWorkOrders": true
},
"knowledgeSettings": {
"enableKnowledge": true
},
... etc ...

Same happened to me using OrderManagement feature

Was this page helpful?
0 / 5 - 0 ratings