Play with ANT: Salesforce Force.com Migration Tool

October 17, 2016

The Force.com Migration Tool is a command-line utility based on Java Ant. It is helpful in moving metadata, code, objects and schema between a Salesforce org and local directory.

Play-with-ANT-Salesforce-Force.com-Migration-Tool-SignitySolutions

The ANT Salesforce Migration Tool is particularly useful in the scenarios as:

 

  1. Whenever you need to populate a test environment for development projects.
  2. Multi-Environment release processes such as iteration, testing, and staging before going to a production environment.
  3. Repetitive deployment using the same set of parameters.
  4. Migrating from stage to production environment.
  5. Scheduling deployments in batches.

Installing the Force.com Migration Tool

 

Before you proceed to install the Force.com Migration Tool, you will need Ant as well as Java installed on your machine. You also need to configure ANT and Java correctly. Java version 1.7.x or later is advisable for better security.

However, you can download the Force.com Migration software Tool from the Salesforce organization. After downloading, install the Force.com Migration Tool. This Salesforce integration will benefit your business in the long run.

After installing the Force.com Migration tool, you need to:

1. Enter Salesforce Connection Information.

2. Construct a Project Manifest.

  • Specify Standard Objects.
  • Specify Named Components
  • Mention all Components of a Type
  • Specify Standard Objects
  • Get Information About Metadata Types
  • Describe Metadata Types
  • List Components for a Metadata Type

3. Create, Retrieve Targets

  • Retrieve Components in Bulk
  • Reclaim Unpackaged Components
  • Retrieve Managed or Unmanaged Packages
  • Retrieve Components in Bulk

4.. Retrieve Metadata from a Salesforce Organization

5. Edit Metadata

6. Delete Files from an Organization

  • Delete Components in a Deployment
  • Add and Delete Components in a Single Deployment

7. Deploy Changes to a Salesforce Org. (The details of the specific target environment to deploy is given in build .xml file).

  • Use Components
  • Deploy Code
  • Deploy a Recent Validation
  • Run Tests in a Deployment
  • Default Test Execution in Production
  • Default Test Execution in Production for API Version 33.0 and Earlier
  • Run a Subset of Tests in a Deployment
  • Run Specific Tests. You can specify only test classes, but you cannot give specific individual test methods.
  • Run the Similar Tests in Production and Sandbox Deployments.
  • Cancel the Deployment if required.
  • Check the Status of the task deployed.

You can check the infographic here:

 Salesforce-Ant-Migration-Tool-Infographics

 

Common Migration Issues

 

There are certain common migration issues you may run into when migrating metadata as well as deploying changes. These issues can also be broadly classified into three categories as Metadata Issues, Connectivity Issues and Testing and Code Coverage issues.

The most common Metadata issues faced are:

 

  • Retrieving custom fields on standard objects
  • Workflow
  • Profiles or permission sets and field-level security
  • Understanding packages
  • Retrieving or deploying components that depend on an object definition
  • Personal folders — Users’ personal folders, for both documents and reports are not exposed in the Metadata API.

The most common Connection Issues are detailed below:

 

 Request timed out

  • PollWaitMillis is the number of milliseconds system waits between polls for deployment and retrieves results.
  • MaxPoll is the number of poll attempts performed before aborting with the default value of 200.

Invalid username, password, user locked out or security token issues.

  • Username – Ensure your username is correct.
  • Password — Ensure your password is correct and security token is appended to the end of the password.
  • Security token — Ensure that the security token is a 25 digit string appended to the password.
  • Locked out — Unsuccessful logging into an organization many times will lock your username temporarily.

Proxy settings Error— you will get a Proxy error if you do not follow proper Ant Proxy Configuration instructions.

  • To avoid Testing and Code Coverage issues, you need to conduct the test in Apex before deployment.

However, in order to install the Ant Salesforce migration and overcome these migration, metadata and connection issues, you can take help of the best Salesforce consulting company. Signity solutions, a leading cloud based CRM development company can help you with Salesforce integration services. We have a team of experts who can understand your requirements and provide you with the best solutions. So, contact us now and hire our outsourcing team! You can also send us your requirements at: [email protected]

Abhishek Sharma

Abhishek Sharma

Head of Salesforce & Zoho at Signity Solutions
With decade of technical experience in CRM, specifically Salesforce. A highly energetic individual and an equally good team player, Abhishek has a deep knowledge of complex, challenging and custom CRM implementations as well as integrations. With strong analytical skills, he is known to manage and deliver crucial projects in time and per expectations.
Abhishek Sharma

Get In Touch

Send us your requirements. We will get back to you with a free quote.

Want to See Your Idea as the Next Big Thing?

  • With Signity Solutions, your business is destined to grow at a new level. Get in touch today to create a game changing experience.

Send Us a Message

SSL-Security-SignitySolutions

Our Global workspaces

Contact-India-SignitySolutions
IndiaHQ

Bestech Business Tower
A-413, 4th Floor, Tower A, Sector-66
Mohali Punjab 160066, IN
+91-172-411-8913

Contact-Australia-SignitySolutions
New Zealand

14049, 35 George
Street, Kingsland
Auckland 1024.
+64 22 111 0002

Contact-United-States-SignitySolutions
USA

762 Green St, Suite 1-R,
Iselin, NJ 08830
+1-618-851-2377

Drop us an e-mail at [email protected]