Change Sets

Change Sets

Change Sets in Salesforce are in essence a group of components that are to be deployed from one Salesforce org to another, typically from a sandbox to production (although it can be the other way around). The appeal of using change sets over other methods, such as deploying through Git, is the declarative nature of them.

Change Sets are built into Salesforce and are designed to be more user friendly allowing users aside from DevOps teams & developers to also utilise… you can access the Change Sets page from inside the Setup menu.

A quick note regarding Change Sets: Change Sets had their place, but are now superseded by the vast amount of version control & deployment technologies we have in the Salesforce Ecosystem now. Salesforce are releasing their own DevOps centre which cannot really be compared to Change Sets as the difference (and improvements) are quite vast. For more information, view this SalesforceBen blog post here.

Creating a Change Set

  1. From Setup, go to ‘Outbound Change Sets’ and press the first option,
  2. Click the ‘New’ button,
  3. Enter a meaningful name for the Change Set & hit Save,
  4. In the Components section, click the ‘Add’ button,
  5. Select the components you want to deploy and press the ‘Add to Change Set’ button,
  6. Press ‘View/Add Dependencies’ to see whether the components selected are dependent on other components, &
  7. If so, make sure you select the dependent components and press ‘Add to Change Set’.

Once the outbound section is done, we now need to authorise a ‘deployment connection’. To do this, log into the environment that you’re wanting to send these changes to and go to the Setup menu.

  1. Once here, type in ‘Deployment Settings’ and press the first option,
  2. Click ‘the Edit’ next to the org you’re wanting to receive the Change Set from, &
  3. Select ‘Allow Inbound Changes’ and press ‘Save’.

To send the changes to this environment, we need to go back into the environment where we created the Change Set…

  1. Go back into the ‘Outbound Change Sets’ in Setup,
  2. Find the newly created Change Set, &
  3. Click the ‘Upload’ button and then when ready, ‘Deploy’.

Considerations

  • If the deployment fails, for any reason, the whole deployment is rolled back,
  • Once deployed successfully, the changes cannot be rolled back,
  • You can only deploy changes made through the Setup menu,
  • You can deploy unto 2,500 components at once.
Cameron Ofoluwa
WRITTEN BY

Cameron Ofoluwa

22 Year Old Salesforce Developer @ Pogust Goodhead & Founder of SFDXHours.

Leave a Reply

Your email address will not be published. Required fields are marked *