Preface: this post is part of the Write Your First Trigger From Start to Finish series.
Good news – this step is easy!
We’ll be deploying our simple trigger from sandbox to our normal Salesforce (aka production) org. If you’re not using a sandbox connected to a real org, you don’t need to deploy – your code is already live!
We’ll be using a standard Salesforce feature called change sets to deploy.
Step 0: Connect your Sandbox and Production orgs
Setup >> Deploy >> Deployment Connections
You’ll only need to do this once!
Step 1: Navigate to the Outbound Change Sets page in Sandbox
Setup >> Deploy >> Outbound Change Sets
Step 2: Add all necessary components to a new change set, then upload to Production
Step 3: Login to your production org, find the Inbound Change Set, and deploy!
Setup >> Deploy >> Inbound Change Sets
Once you hit the “Deploy” button (no need to validate!), you’ll have to wait a few minutes for the changes to go through. Grab yourself a nice cup of coffee while you wait and give yourself a pat on the back for deploying your first trigger!
Next Post: Intro to SOQL and why you should learn it