Everyone who works with Salesforce should be hearing the term Deployment every once in a while. The deployment process enables you to safely transfer a wide variety of new developments from your sandbox to your production.
Everyone who works with Salesforce should be hearing the term Deployment every once in a while. The deployment process enables you to safely transfer a wide variety of new developments – be it validation rules, custom objects, new fields or apex code or a huge range of other components – from your sandbox (You don’t use a sandbox? Better start doing so!) to your production instance.
However working with the standard Salesforce UI can be tricky. Your administrators might’ve experienced trouble while using Change Sets. Since they seem to be the go-to way to fire a deployment, Change Sets suffer from very long loading times (It might take 30+ minutes until a change set is available on the target platform!) and of course a very low usability. For every component type you want to deploy, you have to navigate through a huge dropdown list and then search for the specific component name.
This is not fun. However, Salesforce offers to its users another way to deploy, and it’s a fast way: a deployment based on a package.xml file. This file contains a list of all components you want to deploy. Please go ahead and check out the Salesforce Metadata API to learn more about this.
However once you were able to create a package.xml file, you can choose between two ways to a) retrieve the components from the source organization and b) deploy them to the target organization.
So here’s way no. 1: the Force.com Migration Tool.
Navigate to Setup -> Tools, then check out the Force.com Migration tool. Basically you’ll need to install Apache ANT and be familiar with the command line of your operating system to be able to use that tool.
Once the tool is set up, you can easily configure deploy- and retrieve-calls.
Another possibility which is a bit slower but easier to use, is to log in to the Salesforce Developer workbench, navigate to the corresponding tab and choose “retrieve” or “deploy” from the dropdown menu.
Deployment is recommended in three ways:
- Inbound/Outbound Change Sets
- Deployment via the Salesforce Migration Tool (ANT)
- Using the developer workbench
The package.xml file can be autogenerated from SFDC if you have a list of components available. One of our customers uses a salesforce object with a text field to maintain deployment instructions – this field can be automatically read by an apex class that gathers the deployment instructions and lets you download those instructions in the correct xml format from a visualforce page.
Overall, the deployment process doesn’t need to necessarily take up to several hours. Components can be gathered, retrieved and deployed within minutes only. It is your choice.
Neueste Artikel von Lukas Heinen (alle ansehen)
- What you need to know about Pushtopics in Salesforce - 12. Mai 2016
- Agile Alternatives: Kanban - 1. Februar 2016
- Salesforce Deployment – Best Practices - 10. November 2015
- The Salesforce Tooling API - 28. Juli 2015
- Breaking up – a short workaround on Salesforce tables to remain scrollable - 19. Dezember 2014