Thank you for starting one of my courses on Pluralsight! Here's some information to help you get the configuration and code used throughout the courses installed into your own org. This repository covers the following courses
- Salesforce Development: Fundamentals
- Salesforce Development: Data Modeling and Management
- Salesforce Development: Process Automation and Logic
- Salesforce Development: User Interface
- Salesforce Development: Testing, Debugging, and Deployment
If you run into any issues or want to leave some feedback for me, feel free to drop a comment in Pluralsight or reach out to me on Twitter or LinkedIn!
Choose whether you want to use a developer org or scratch org. Choose a development model.
- Git
- Salesforce CLI
- Relevant Salesforce extensions for your IDE
- For VS Code, Salesforce Extension Pack
- Salesforce Extensions Documentation
- Salesforce CLI Setup Guide
- Salesforce DX Developer Guide
- Salesforce CLI Command Reference
-
Clone the repository to your computer and navigate to that folder
git clone https://github.com/adam17amo/platformDev.git
cd platformDev
-
Open the platformDev folder in your IDE
-
Create a new Developer Edition org or Enable an org as a Dev Hub and create a scratch org org with the alias platformDev
3a. Authorize your Developer Edition org via your IDE or via a command
sfdx force:auth:web:login --setalias platformDev --instanceurl https://login.salesforce.com --setdefaultusername
3b. If you don't already have your Dev Hub authorized, authorize it via your IDE or run the first command. Once it's authorized, create your scratch org via the second command
sfdx auth:web:login --setdefaultdevhubusername --setalias my-hub-org
sfdx force:org:create -s -f config/project-scratch-def.json -a platformDev --durationdays 30
-
Deploy the code to your org
4a. If you're using a Developer Edition Org to deploy the code
sfdx force:source:deploy -p force-app/main/default
4b. If you're using a Scratch Org to deploy the code
sfdx force:source:push
-
Assign yourself the permission set
sfdx force:user:permset:assign --permsetname Wired_Brain
- Install this package into your org
- Assign yourself the Wired Brain permission set
- (Optional) Create some sample data for Stores, Suppliers (Accounts), and Store Supply Orders. Feel free to use the data folder as a guide
- (Optional) Download the code to your computer to follow along
git clone https://github.com/adam17amo/platformDev.git
cd platformDev
-
Update the suppliers.json file to create sample data with the ID of the Supplier record type by running these commands in a terminal in your IDE
1a. For Mac
sfdx force:data:soql:query -q "SELECT Id FROM RecordType WHERE DeveloperName = 'Supplier'" | grep -E -o "([0-9])\w+" > recordType.txt; sed -i '' "s/\supplierRecordTypeId/$(cat recordType.txt)/g" data/suppliers.json; rm recordType.txt
1b. For Windows
sfdx force:data:soql:query -q "SELECT Id FROM RecordType WHERE DeveloperName = 'Supplier'" | findstr /R "012[a-zA-Z0-9]*" > recordType.txt
(Get-Content data/suppliers.json) -replace 'supplierRecordTypeId', (Get-Content recordType.txt).substring(1,18) | Set-Content data/suppliers.json; rm recordType.txt
1c. Manually (if the above scripts don't work)
- Navigate to your Salesforce Org -> Setup -> Object Manager -> Account -> Record Types -> Supplier and get the ID from the URL (starts with '012')
- In the code, navigate to the suppliers.json file in the data folder and replace all instances of supplierRecordTypeId with the ID from the previous bullet
-
Import the sample data
sfdx force:data:tree:import -p data/data-plan.json