Field Service not enabled in Scratch org even though it is enabled in scratch org definition file
See original GitHub issueSummary
We have Field Service enabled in scratch org definition file, but yesterday it stopped working. Scratch org is created, but Field Service is not enabled. Other features are working fine.
This breaks a lot of CI/CD scripts, and it prevents us from making new package versions (most critical) since ore metadata has references to WorkOrder and ServiceAppointmen (and more). This objects are not available if Field Service is not enabled.
Steps To Reproduce:
- Create a empty sfdx project
- Use the following scratch org definition file: project-scratch-def.zip
- Run
sfdx force:org:create -f config\project-scratch-def.json --setalias test --durationdays 1
to create scatch org
Expected result
Scratch org is created, and Field Service is enabled under Field Service Settings in Setup
Actual result
Scratch org is created, but Field Service is NOT enabled under Field Service Settings in Setup.
Additional information
SFDX CLI Version (to find the version of the CLI engine run sfdx --version): 7.85.1
SFDX plugin Version (to find the version of the CLI plugin run sfdx plugins --core): 50.16.1
OS and version: Windows 10
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
We started seeing this issue yesterday (March 11). According to our pipeline history, this was working as recently as March 8. Our scratch org definition file includes both
and
As a workaround - we have an automated build script that:
force:source:push
es all source.I found that adding
FieldService.settings
to the MDAPI pre-deploy does successfully enable FSL, which allows the FSL managed package (and subsequent source push) to succeed. MyFieldService.settings
is bare-minimum:The issue is now fixed and Field Service is now correctly enabled when you create a scratch org.