I am setting up an AppExchange package on SFDX with Namespace. After the installation of the App, we have various manual changes (enable field history on Standard objects, add record types to Standard objects, enable org-wide settings, custom settings records, Profile/permission set assignments, Test Data generation, etc.).

I am able to successfully set up the App with Namespace on Scratch org and configuration changes. Now, my worry is Scratch org 's maximum lifetime is 30 days.

In this case, whenever a developer wants to do a small change after 30 days he needs to set up the manual configuration again. Is it possible to generate lifetime Scratch orgs by contacting Salesforce? If not, I have two approaches to solve this :

  1. Setup Individual Developer orgs for Developers and do manual configuration one time. In this case, I don't need to repeat the manual process again.
  2. Create a script for manual changes (wherever possible) and run that script on new scratch org every time on a new scratch org.

Please suggest, if there is any better way to minimize the manual changes required on a Scratch org.


Scratch Orgs are intentionally "throw away". If you want to keep org configuration and data, use a Dev Org instead.

Regardless, where it is sensible to include the configuration with your package and where there are APIs to allow you to manage the configuration, you should write an InstallHandler for your package and configure this to execute on install and upgrade as needed.

For those elements of configuration that cannot be managed this way, and where it makes sense for the business to enable the configuration, you can certainly provide a document describing the manual steps to complete configuration.

| improve this answer | |

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.