I am new to salesforce and just discovered that there are two options to deploy metadata to production:
- using ChangeSets
- using Force.com Migration tool
Could somebody please clarify me on which one to use under what conditions?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Both can be used for deployment for almost anything. Personally I found, if deployment is small, I use changeset but for larger deployments(and first time deployment of large project) we prefer Ant(Migration Tool).
Reason - in changeset- if i've to deploy say 100 fields for some object. I've to make individual selection of each field to add in changeset before uploading to other environment. Consider If you've 10-15 such object!. This is too much time consuming and error-prone. Through Ant, all what I've to do is to mention object in XML, all fields will automatically get deployed
Other thing, If I've to delete components in production, I've option to do through ANT( Destructive.XML) while no such option is available in changeset
last thing changeset is only used for deployment in connected orgs, while through ANT you can deploy in any org.
Changesets are a way to deploy components through the standard salesforce UI. A user first creates a Outbound Changeset on the Source org and adds the components they wish to deploy. Once ready, the changes is uploaded to a Destination ORG. The deployment can then be validated and deployed from within the Destination ORG>
Don't need to be a developer
Anyone can see list of components deployed
The Ant Migration Tool uses a technology called Apache Ant to allow you to retrieve and deploy meta-data. Besides typical deployments, there are countless uses for this, but here are some common ones:
With ant, you typically build XML packages of the meta-data your concerned with then use the command line to first retrieve the meta data. Now that the meta data is locally on your machine, you can use the command line to push it to a different ORG.
The real power of the migration tool comes from the ability to write scripts to do complex and receptive deployment tasks.