Scratch Org Shape
- How to shape your scratch org which necessary features and settings
- How to push your local source and pull changes from scratch org
- Understanding the advantages of source tracking api
Time to complete: 45 Minutes
- Add communities in features
- Enable network settings under settings
- Enable Experience bundle metadata under settings
{
"orgName": "Dreamhouse",
"edition": "Developer",
"features": ["Communities"],
"settings": {
"communitiesSettings": {
"enableNetworksEnabled": true
},
"experienceBundleSettings": {
"enableExperienceBundleMetadata": true
}
}
}
- Add ContactsToMultipleAccounts in features
- Install all the package dependencies to your scratch org
Don't want to use the CLI command over and over installing multiple packages?
Try
sfdx sfpowerkit:package:dependencies:install
- Go to setup > Object Manager > Create > Custom Object
Field | Value |
---|---|
Label | Inspection |
Plural Label | Inspections |
Object Name | Inspection |
Record Name | Inspection Id |
Data Type | Auto number |
Display Format | Ins-{000000} |
Starting Number | 1 |
- Create the following fields within Inspection Object:
- Create a Master detail field to Contact object with Field name Customer
- Create a Master detail field to Property__c object with Field name Property
- Create a field with data type Date and API name Inspection_Date
- Create a field with data type Time and API name Time_Slot
- Go to Setup > Sharing Settings > Account Sharing Rules > New

The details to be used on the sharing rule
- Go to Setup > Business Hours > New
%20(1)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media)
The details to be used on the business hours
- Commit the changes to the repo
Shape is an important concept that one needs to understand while working with Scratch Orgs. Anything that can be applied in shape, can also be applied using Metadata API (settings). This can be a quite daunting task to understand all what has been enabled in an existing org, For this we can use the shape https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_org.htm#cli_reference_shape_create
Last modified 2mo ago