I am struggling to figure out how to -- or if it's even possible to -- create a DX scratch org with the "Field Service Lightning" (FSL) feature installed. Based on the feature list here I'm guessing the answer is no and I'll just have to wait. But I'm not sure I'm interpreting that source correctly or missing something entirely since I'm just wrapping my head around DX.

Background: we have a production org with FSL installed and active, along with it's accompanying managed packages. I can create sandboxes from it and do development using standard Metadata API tools, but I was hoping to start a new project using DX. But I'm stuck configuring a scratch org with the proper features.


I heard from the DX team that as of today (October 2017), this is not possible, as I suspected. However, I was told that it is possible via a new process called "shape orgs", which is currently in pilot.

| improve this answer | |
  • Do we know when shape org will be GA? – Mystery Jul 2 '18 at 9:13
  • No, no new information since the Spring '18 release notes, which stated: "Org Shape for Scratch Orgs Pilot Has Been Suspended. Removed information regarding how to sign up for the Org Shape for Scratch Orgs pilot. Due to outstanding bugs, we aren’t accepting any new pilot participants." – ArtieBrosius Jul 2 '18 at 14:38
  • FWIW - FSL is still not working in my "preview" Winter '20 scratch org. I can turn it on manually after creating the org. I do not know of a method programmatically – bkwdesign Sep 20 '19 at 15:50

This is now possible if you specify the feature and settings in your project-scratch-def.json file like so:

    "features": ["FieldService"],
    "settings": {
        "fieldServiceSettings": { "fieldServiceOrgPref": true }
| improve this answer | |
  • You can also automate to further install the Field Service managed packages after you create a scratch org with with the above scratch definition: sfdx force:package:install --package [pacakge id] --apexcompile package --securitytype AllUsers --noprompt --wait 15 -u [org alias] using these ids: 04t0M000001i20fQAA (FSL Package) - 04t1R0000016YZtQAM (Salesforce Field Service App Package) – Christian Menzinger Jan 13 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.