Create new task
Use cases
You use this command when you want to :
- Create a dedicated new branch
- Create a scratch org linked to the branch OR assign a dedicated sandbox to the newly created branch
Sandbox or scratch org ?
With SFDX, usually each member of the teams has its own sandbox or scratch org to work on it.
The release manager of the project can tell you if you work with scratch orgs or source-tracked sandboxes, and which sandbox to use if you are in sandbox mode.
Source-tracked sandbox mode
Pre-requisites (sandbox)
You need credentials to login on the source-tracked sandbox you'll work with. It can be:
- An existing source-tracked sandbox
- Existing source-tracked sandboxes must be refreshed from time to time to avoid too many conflicts, discuss with your Release Manager !
- Release managers: When you create or refresh a sandbox, you can easily activate invalid users with a few clicks
- A new source-tracked sandbox that you can create from production org
It is recommended to create sandbox from the org that is related to the target git branch.
Start new task on sandbox
Select sandbox
- Open VsCode SFDX Hardis extension by clicking on in VsCode left bar (loading can task several seconds)
- Answer the questions then select Sandbox when prompted
- If the sandbox is not proposed in the list, select the option to authenticate to your desired sandbox
Update your sandbox ?
- When prompted if you want to update your sandbox:
- Select
yes
only if you have NO pending work in your sandbox that you'll want to publish later- If the update script fails, you can manually deploy single metadatas using
Right click -> Deploy to org
(see screenshot below)
- If the update script fails, you can manually deploy single metadatas using
- Otherwise, select
no
- Select
Example of manual deploy of a metadata that you think could have been updated in parent branch, after an Update sandbox failure
Work
-
At the end of the script execution:
See details in hardis:work:new command documentation
Scratch Org mode
Pre-requisites (scratch org)
You need the credentials to login on the Dev Hub Org (usually the production environment)
Start new task on scratch org
- Answer the questions then select Scratch Org when prompted
- If the sandbox is not proposed in the list, select the option to authenticate to your desired sandbox
- Wait for the sandbox creation script to be completed, and you can start working in it :)
- If you see errors while creating the sandbox, request support from the project release manager
See details in hardis:work:new command documentation