How to deploy code from Sandbox to Production
Preface:
this post is part of the Write Your First Trigger From Start to Finish series.
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
In this case, we’ll add both the ForceForecasting trigger and the TestForceForecasting Apex class.
We can add tons of other things like custom objects and fields, but don’t worry about that for now!
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!
this post is part of the Write Your First Trigger From Start to Finish series.
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
In this case, we’ll add both the ForceForecasting trigger and the TestForceForecasting Apex class.
We can add tons of other things like custom objects and fields, but don’t worry about that for now!
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!
No comments :
Post a Comment