function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gtuerk_greensaasgtuerk_greensaas 

SalesforceDX - Enabling Path Settings in Unlocked Package

I noticed something strange while building a small unlocked package that included a Lightning Record Page with Paths.  I enabled Paths within the Path Settings and set up a new Path for a Custom object I created.  I pulled down the source, create an unlocked package and version and installed that package version in a new scratch org.  The Lightning Record Page came over just fine, as did the Path itself, but when I looked at the object, the path wasn't there.  I went into Setup and looked at the Path Settings page and the setting was set to disabled.  When I reenabled this in the destination (target) scratch org, I was able to see the path and record page that included it worked just fine.  Is there a problem with carrying 'Path settings' forward in Unlocked Packages?  

#salesforcedx #package2 #pathsettings
Raj VakatiRaj Vakati
Use this ​project-scratch-def.json file ..  Refer orgPreferences section .. 


project-scratch-def.json.

{
  "orgName": "Acme",
  "country": "US",
  "edition": "Enterprise",
  "hasSampleData": "true",
  "features": ["MultiCurrency", "AuthorApex"],
  "orgPreferences": {
    "enabled": ["S1DesktopEnabled", "ChatterEnabled", "PathAssistantsEnabled"],
    "disabled": ["IsNameSuffixEnabled"]
  }
}
gtuerk_greensaasgtuerk_greensaas
Raj - I think SFDX is enforcing that the orgPreferences must be set in a separate JSON file starting very soon.  Can you change your reply to show that and I'll mark it as the best answer.  BTW, your answer is the best as it is right now - but will be outdated when SFDC enforces above change
Raj VakatiRaj Vakati
I havenot reviewed winter 19 changes..  i belive it will be like below 
https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_sfdx_scratch_orgs_settings.htm
{
  "orgName": "Acme",
  "edition": "Enterprise",
  "features": ["Communities", "ServiceCloud", "Chatbot"],
  "settings": {
      "orgPreferenceSettings": {
          "networksEnabled": true,
          "s1DesktopEnabled": true,
          "s1EncryptedStoragePref2": false
      },
      "omniChannelSettings": {
          "enableOmniChannel": true
      },

      "caseSettings": {
          "systemUserEmail": "support@acme.com"
      }
  }
}