SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
Getting Started with SalesForce CRM
Working Force.com Migration Utility
Description:
BISP is committed to provide BEST learning material to the beginners and advance learners.
In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for
SalesForce. The document focuses on force.com migration utility. Join our professional
training program and learn from experts.
History:
Version Description Change Author Publish Date
0.1 Initial Draft Chandra Prakash Sharma 10th
Oct 2013
0.1 Review#1 Amit Sharma 10th
Oct 2013
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1
Contents
.........................................................................................................................................................2
Force.com Migration Tool Overview .................................................................................................3
Understanding Metadata API :....................................................................................................3
Installing the Force.com Migration Tool..........................................................................................3
How set ant path :.......................................................................................................................4
......................................................................................................................................................5
Using the Force.com Migration Tool ..............................................................................................5
SalesForce Connection Information:...........................................................................................5
Constructing a Project Manifest :................................................................................................6
Describing Metadata Types :......................................................................................................7
Listing Components for a Metadata Type :................................................................................8
Creating Retrieve Targets :.........................................................................................................9
Retrieving Metadata from a SalesForce Organization :................................................................10
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 2
Force.com Migration Tool Overview
The Force.com Migration Tool is a Java/Ant-based command-line utility for moving metadata
between a local directory and a SalesForce organization.
 Development projects where you need to populate a test environment with large amounts of
setup changes — Making these changes using a Web interface could take a long time.
 Multistage release processes — A typical development process requires iterative building,
testing, and staging before releasing to a production environment. Scripted retrieval and
deployment of components can make this process much more efficient.
 Repetitive deployment using the same parameters — You can retrieve all the metadata in
your organization, make changes, and deploy a subset of components. If you need to repeat
this process, it's as simple as calling the same deployment target again.
 When migrating from stage to production is done by IT — Anyone that prefers deploying in a
scripting environment will find the Force.com Migration Tool a familiar process.
Understanding Metadata API :
Metadata API contains a set of objects that manage setup and customization information
(metadata) for your organizations,
and the SOAP calls that manipulate those objects. With Metadata API you can:
 Work with setup configuration as XML metadata files
 Migrate configuration changes between organizations
 Create your own tools for managing organization and application metadata
Installing the Force.com Migration Tool
Before you install the Force.com Migration Tool you will need Java and Ant installed on your local
machine.
you can download on this link : http://ant.apache.org/ and also need JDK 1.6.x or later. .
http://www.oracle.com/technetwork/java/javase/downloads/index.html
1. Install Java and Ant.
2. Login to a SalesForce organization and download the Force.com Migration Tool, as described in
Installing the Force.com
Migration Tool.
download the Force.com Migration Tool from a SalesForce organization.
Click on Setup > Develop > Tools, then click Force.com Migration Tool. see below.
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 3
Save the .zip file locally and extract the contents to the directory of your choice.
Copy ant-salesforce.jar and paste into your Ant installation's lib directory. The lib directory is located
in the
root folder of your Ant installation.
After install Jdk check java version open command prompt then type java -version, you can see
below.
How set ant path :
Syntax Example
SET ANT_HOME=my_path_to_ant_folder Ex : SET ANT_HOME= D:cp
sharmaswapache-ant-1.9.3-binapache-ant-
1.9.3
SET JAVA_HOME=my_path_to_jdk_folder Ex: C:Program FilesJavajdk1.7.0_45
SET PATH=%PATH%;%ANT_HOME%/bin;
%JAVA_HOME%bin;
Ex : SET PATH=%PATH%;%ANT_HOME
%/bin;%JAVA_HOME%bin;
After set path you can check ant version by using this syntax.
syntax : ant -version
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 4
Using the Force.com Migration Tool
The Force.com Migration Tool is a Java/Ant-based command-line utility for moving metadata
between a local directory and a SalesForce organization.
The general procedure you will follow when using the Force.com Migration Tool to copy metadata
from one SalesForce organization to another is:
1) Enter credentials and connection information for source SalesForce organization in
build.properties
2) Create retrieve targets in build.xml
3) Construct a project manifest in package.xml
4) Run the Force.com Migration Tool to retrieve metadata files from SalesForce
5) Enter credentials and connection information for destination SalesForce organization in
build.properties
6) Run the Force.com Migration Tool to deploy metadata files or deletions to SalesForce
SalesForce Connection Information:
1. Go to the location where you extracted the Force.com Migration Tool files and open the sample
subdirectory.
2. Open build.properties in a text editor and substitute a valid SalesForce username and password.
If you are using a security token, paste the 25-digit token value to the end of your password.
you can see below.
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 5
Constructing a Project Manifest :
The package.xml file is a project manifest that lists all the components you want to retrieve or
deploy in a single request. You can retrieve or deploy only a single package at a time.
The following elements may be defined in package.xml :
Name Description
<fullName> The name of the server-side package to deploy into. If the <fullName> field is
omitted, components will not be assigned to a package when deployed, and
will be in the unpackaged package.
<types> This element contains one or more <members> tags and one <name> tag,
and is used to list the metadata components of a certain type to retrieve or
deploy.
<members> The full name of a component. There is one <members> element defined for
each component in the directory. You can replace the value in this member
with the wildcard character * (asterisk) instead of listing each member
separately.
<name> There is one name defined for each component type in the directory. This is
a child element of <types>.
<version> The Metadata API version number of the files being retrieved or deployed.
When
deploying, all the files must conform to the same version of the Metadata
API.
Specifying Standard Objects :
To retrieve standard objects and/or custom fields on standard objects, you must name the
component in package.xml.
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 6
Specifying Named Components :
To retrieve a component, specify the type of component in the <name> element and declare each
component to be retrieved or deployed in the <members> element. The following is a sample
package.
Specifying all Components of a Type :
To retrieve all components of a particular type, use the wildcard symbol (*). For example, to retrieve
all custom objects:
Specifying Standard Objects :
To retrieve standard objects and/or custom fields on standard objects, you must name the
component in package.xml.
Describing Metadata Types :
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 7
Field Description
username Required. The SalesForce username for login. The username associated
with this
connection must have the "Modify All Data" permission.
password Required. The password you use to log into the organization associated with
this project. If you are using a security token, paste the 25-digit token value
to the end of your password.
serverurl Optional. The SalesForce server URL (if blank, defaults to
login.salesforce.com).
To connect to a sandbox instance, change this to test.salesforce.com.
apiVersion Optional. The API version to use for the metadata. The default is 29.0.
resultFilePath Optional. The path of the output file where results are stored. The default
output is the console. Directing the output to a file makes it easier to extract
the relevant information for your package.xml manifest file.
trace Optional. Defaults to false. Prints the SOAP requests and responses to the
console.
Note that this will show the user's password in plain text during login.
Get the list of metadata types enabled for your organization, specify a target in the build.xml file
using
Listing Components for a Metadata Type :
The listMetadata target retrieves property information about metadata components in your
organization. This target is useful when you want to identify individual components in package.
Field Description
username Required. The SalesForce username for login. The username associated with
this connection must have the “Modify All Data” permission.
password Required. The password you use to log into the organization associated with
this project. If you are using a security token, paste the 25-digit token value to
the end of your password.
serverurl Optional. The SalesForce server URL (if blank, defaults to
login.salesforce.com).
To connect to a sandbox instance, change this to test.salesforce.com.
metadataType Required. The name of the metadata type for which you are retrieving
property
information; for example, CustomObject for custom objects, or Report for
custom
reports.
folder The folder associated with the component. This field is required for
components that use folders, such as Dashboard, Document, Email Template,
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 8
or Report.
apiVersion Optional. The API version to use for the metadata. The default is 29.0.
resultFilePath Optional. The path of the output file where results are stored. The default
output is the console. Directing the output to a file makes it easier to extract
the relevant information for your package.xml manifest file.
trace Optional. Defaults to false. Prints the SOAP requests and responses to the
console.
Note that this will show the user's password in plain text during login.
Get property information for components of one metadata type, such as CustomObject, specify a
target in the build.xml file using
Creating Retrieve Targets :
The build.xml file specifies a series of commands to be executed by Ant. Within the build.xml file
are named targets that process a series of commands when you run Ant with a target name. The
following parameters may be set for each <sf:retrieve> target :
Field Description
username Required. The SalesForce username for login. The username associated with
this connection must have the “Modify All Data” permission.
password Required. The password you use to log into the organization associated with
this project. If you are using a security token, paste the 25-digit token value to
the end of your password.
serverurl Optional. The SalesForce server URL (if blank, defaults to
login.salesforce.com).
To connect to a sandbox instance, change this to test.salesforce.com.
retrieveTarget Required. The root of the directory structure into which the metadata files are
retrieved.
packageNames Required if unpackaged is not specified. A comma-separated list of the names
of
the packages to retrieve.
apiVersion Optional. The API version to use for the metadata. The default is 29.0.
pollWaitMillis Optional. Defaults to 10000. The number of milliseconds to wait between
attempts
when polling for results of the retrieve request.
maxPoll Optional. Defaults to 20. The number of times to poll the server for the results
of
the retrieve request.
singlePackage Optional. Defaults to true. This must be set to false if you are retrieving
multiple
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 9
packages. If set to false, the retrieved zip file includes an extra top-level
directory
containing a subdirectory for each package.
trace Optional. Defaults to false. Prints the SOAP requests and responses to the
console.
Note that this will show the user's password in plain text during login.
unpackaged Required if packageNames is not specified. The path and name of a file
manifest
that specifies the components to retrieve.
unzip Optional. Defaults to true. If set to true, the retrieved components are
unzipped.
Retrieving Metadata from a SalesForce Organization :
To retrieve Force.com components :
1. Open a command prompt.
2. Run Ant by specifying a target name in build.xml. If this is the first time you are running Ant, use
ant
retrieveUnpackaged to retrieve unpackaged components specified in package.xml.
Running Tests in a Deployment :
For deployment to a production organization, all the tests in your organization, except for those that
originate from installed
If the deployment includes components for any of the following metadata types, all the tests are
automatically run.
 ApexClass
 ApexComponent
 ApexPage
 ApexTrigger
 ArticleType
 CriteriaBasedSharingRule
 CustomDataType
 CustomField
 CustomObject
 DataCategoryGroup
 Flow
 InstalledPackage
 NamedFilter
 OwnerSharingRule
 PermissionSet
 Profile
 Queue
 RemoteSiteSettingRecordType
 Role
 SharingReason
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 10
 Territory
 Validation Rules
 Workflow
www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 11

Más contenido relacionado

La actualidad más candente

Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentalsAmit Sharma
 
E mail and-workflow-administation
E mail and-workflow-administationE mail and-workflow-administation
E mail and-workflow-administationAmit Sharma
 
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...Amit Sharma
 
Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Amit Sharma
 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforceRinku Saini
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginnershrakhra
 
Custom Controllers and Controller Extensions
Custom Controllers and Controller Extensions Custom Controllers and Controller Extensions
Custom Controllers and Controller Extensions Mohammed Safwat Abu Kwaik
 
Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.Yogesh Chandr
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookiesMahmoudOHassouna
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB MahmoudOHassouna
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex senthil0809
 

La actualidad más candente (17)

Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 
E mail and-workflow-administation
E mail and-workflow-administationE mail and-workflow-administation
E mail and-workflow-administation
 
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
 
Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...
 
Intro to Apex Programmers
Intro to Apex ProgrammersIntro to Apex Programmers
Intro to Apex Programmers
 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforce
 
Vf ppt (1)
Vf ppt (1)Vf ppt (1)
Vf ppt (1)
 
Apex basics-for Beginners
Apex basics-for BeginnersApex basics-for Beginners
Apex basics-for Beginners
 
Custom Controllers and Controller Extensions
Custom Controllers and Controller Extensions Custom Controllers and Controller Extensions
Custom Controllers and Controller Extensions
 
Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.
 
Salesforce Winter Release
Salesforce Winter ReleaseSalesforce Winter Release
Salesforce Winter Release
 
Oracle EMC 12C Grand Tour
Oracle EMC 12C Grand TourOracle EMC 12C Grand Tour
Oracle EMC 12C Grand Tour
 
Test script
Test scriptTest script
Test script
 
Abap proxies
Abap proxiesAbap proxies
Abap proxies
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookies
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex
 

Destacado

TMOUG - Engineered Systems Overview
TMOUG - Engineered Systems OverviewTMOUG - Engineered Systems Overview
TMOUG - Engineered Systems OverviewMark Rabne
 
Fusion Middleware 11g Keynote Foundation For Innovation
Fusion Middleware 11g Keynote Foundation For InnovationFusion Middleware 11g Keynote Foundation For Innovation
Fusion Middleware 11g Keynote Foundation For InnovationMark Rabne
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-labAmit Sharma
 
Sales force certification-lab-ii
Sales force certification-lab-iiSales force certification-lab-ii
Sales force certification-lab-iiAmit Sharma
 
Hfm calculating RoA
Hfm calculating RoAHfm calculating RoA
Hfm calculating RoAAmit Sharma
 
Understanding Oracle GoldenGate 12c
Understanding Oracle GoldenGate 12cUnderstanding Oracle GoldenGate 12c
Understanding Oracle GoldenGate 12cIT Help Desk Inc
 
Microsoft dynamics crm videos
Microsoft dynamics crm videosMicrosoft dynamics crm videos
Microsoft dynamics crm videosAmit Sharma
 
Oracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your CostsOracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your CostsMark Rabne
 
Developer’s guide for oracle data integrator
Developer’s guide for oracle data integratorDeveloper’s guide for oracle data integrator
Developer’s guide for oracle data integratorAbhishek Srivastava
 
Oracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandOracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandMark Rabne
 
Fusion Middleware Application Grid
Fusion Middleware Application GridFusion Middleware Application Grid
Fusion Middleware Application GridMark Rabne
 
Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interfaceAmit Sharma
 
Managing users-doc
Managing users-docManaging users-doc
Managing users-docAmit Sharma
 
Security and-data-access-document
Security and-data-access-documentSecurity and-data-access-document
Security and-data-access-documentAmit Sharma
 
Data Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCSData Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCSEdelweiss Kammermann
 
Integrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12cIntegrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12cEdelweiss Kammermann
 

Destacado (19)

TMOUG - Engineered Systems Overview
TMOUG - Engineered Systems OverviewTMOUG - Engineered Systems Overview
TMOUG - Engineered Systems Overview
 
Fusion Middleware 11g Keynote Foundation For Innovation
Fusion Middleware 11g Keynote Foundation For InnovationFusion Middleware 11g Keynote Foundation For Innovation
Fusion Middleware 11g Keynote Foundation For Innovation
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
 
Sales force certification-lab-ii
Sales force certification-lab-iiSales force certification-lab-ii
Sales force certification-lab-ii
 
Hfm calculating RoA
Hfm calculating RoAHfm calculating RoA
Hfm calculating RoA
 
Understanding Oracle GoldenGate 12c
Understanding Oracle GoldenGate 12cUnderstanding Oracle GoldenGate 12c
Understanding Oracle GoldenGate 12c
 
Microsoft dynamics crm videos
Microsoft dynamics crm videosMicrosoft dynamics crm videos
Microsoft dynamics crm videos
 
Oracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your CostsOracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your Costs
 
Developer’s guide for oracle data integrator
Developer’s guide for oracle data integratorDeveloper’s guide for oracle data integrator
Developer’s guide for oracle data integrator
 
Oracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandOracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade Cleveland
 
Fusion Middleware Application Grid
Fusion Middleware Application GridFusion Middleware Application Grid
Fusion Middleware Application Grid
 
Customizing sales force-interface
Customizing sales force-interfaceCustomizing sales force-interface
Customizing sales force-interface
 
Managing users-doc
Managing users-docManaging users-doc
Managing users-doc
 
Security and-data-access-document
Security and-data-access-documentSecurity and-data-access-document
Security and-data-access-document
 
Bi Publisher 11g: Only good news
Bi Publisher 11g: Only good newsBi Publisher 11g: Only good news
Bi Publisher 11g: Only good news
 
Oracle Data Integrator
Oracle Data Integrator Oracle Data Integrator
Oracle Data Integrator
 
Oracle data integrator (odi) online training
Oracle data integrator (odi) online trainingOracle data integrator (odi) online training
Oracle data integrator (odi) online training
 
Data Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCSData Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCS
 
Integrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12cIntegrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12c
 

Similar a Getting Started with SalesForce CRM Tool

User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Salesforce ANT migration
Salesforce ANT migration Salesforce ANT migration
Salesforce ANT migration Cloud Analogy
 
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8c
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8cESM Asset Model FlexConnector Developer's Guide for ESM 6.8c
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8cProtect724v3
 
HP ArcSight Asset Model Import FlexConnector Developer's Guide
HP ArcSight Asset Model Import FlexConnector Developer's GuideHP ArcSight Asset Model Import FlexConnector Developer's Guide
HP ArcSight Asset Model Import FlexConnector Developer's GuideProtect724tk
 
Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Protect724
 
Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Protect724
 
Asset Model Import FlexConnector Developer's Guide
Asset Model Import FlexConnector Developer's GuideAsset Model Import FlexConnector Developer's Guide
Asset Model Import FlexConnector Developer's GuideProtect724migration
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentalsAmit Sharma
 
Custom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex CodeCustom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex CodeBohdan Dovhań
 
Subsystem Framework and Authentication
Subsystem Framework and AuthenticationSubsystem Framework and Authentication
Subsystem Framework and AuthenticationAlfresco Software
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Athena java dev guide
Athena java dev guideAthena java dev guide
Athena java dev guidedvdung
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentMahmoud Samir Fayed
 
Web applications configurator_administrator_guide(e)
Web applications configurator_administrator_guide(e)Web applications configurator_administrator_guide(e)
Web applications configurator_administrator_guide(e)idominguez03
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4than sare
 
Using SP Metal for faster share point development
Using SP Metal for faster share point developmentUsing SP Metal for faster share point development
Using SP Metal for faster share point developmentPranav Sharma
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 

Similar a Getting Started with SalesForce CRM Tool (20)

User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Salesforce ANT migration
Salesforce ANT migration Salesforce ANT migration
Salesforce ANT migration
 
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8c
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8cESM Asset Model FlexConnector Developer's Guide for ESM 6.8c
ESM Asset Model FlexConnector Developer's Guide for ESM 6.8c
 
HP ArcSight Asset Model Import FlexConnector Developer's Guide
HP ArcSight Asset Model Import FlexConnector Developer's GuideHP ArcSight Asset Model Import FlexConnector Developer's Guide
HP ArcSight Asset Model Import FlexConnector Developer's Guide
 
Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0
 
Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0Asset modelimportconn devguide_5.2.1.6190.0
Asset modelimportconn devguide_5.2.1.6190.0
 
Asset Model Import FlexConnector Developer's Guide
Asset Model Import FlexConnector Developer's GuideAsset Model Import FlexConnector Developer's Guide
Asset Model Import FlexConnector Developer's Guide
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 
Custom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex CodeCustom Metadata Records Deployment From Apex Code
Custom Metadata Records Deployment From Apex Code
 
Subsystem Framework and Authentication
Subsystem Framework and AuthenticationSubsystem Framework and Authentication
Subsystem Framework and Authentication
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Add on packages
Add on packagesAdd on packages
Add on packages
 
Athena java dev guide
Athena java dev guideAthena java dev guide
Athena java dev guide
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 
Web applications configurator_administrator_guide(e)
Web applications configurator_administrator_guide(e)Web applications configurator_administrator_guide(e)
Web applications configurator_administrator_guide(e)
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4
 
Using SP Metal for faster share point development
Using SP Metal for faster share point developmentUsing SP Metal for faster share point development
Using SP Metal for faster share point development
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 

Más de Amit Sharma

Oracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptionsOracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptionsAmit Sharma
 
Oracle EPBCS Driver
Oracle EPBCS Driver Oracle EPBCS Driver
Oracle EPBCS Driver Amit Sharma
 
Oracle Sales Quotation Planning
Oracle Sales Quotation PlanningOracle Sales Quotation Planning
Oracle Sales Quotation PlanningAmit Sharma
 
Oracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp convertedOracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp convertedAmit Sharma
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examplesAmit Sharma
 
Oracle PBCS creating standard application
Oracle PBCS creating  standard applicationOracle PBCS creating  standard application
Oracle PBCS creating standard applicationAmit Sharma
 
Hfm rule custom consolidation
Hfm rule custom consolidationHfm rule custom consolidation
Hfm rule custom consolidationAmit Sharma
 
Adding metadata using smartview
Adding metadata using smartviewAdding metadata using smartview
Adding metadata using smartviewAmit Sharma
 
Hyperion planning weekly distribution
Hyperion planning weekly distributionHyperion planning weekly distribution
Hyperion planning weekly distributionAmit Sharma
 
Hyperion planning scheduling data import
Hyperion planning scheduling data importHyperion planning scheduling data import
Hyperion planning scheduling data importAmit Sharma
 
Hyperion planning new features
Hyperion planning new featuresHyperion planning new features
Hyperion planning new featuresAmit Sharma
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utilityAmit Sharma
 

Más de Amit Sharma (13)

Oracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptionsOracle enteprise pbcs drivers and assumptions
Oracle enteprise pbcs drivers and assumptions
 
Oracle EPBCS Driver
Oracle EPBCS Driver Oracle EPBCS Driver
Oracle EPBCS Driver
 
Oracle Sales Quotation Planning
Oracle Sales Quotation PlanningOracle Sales Quotation Planning
Oracle Sales Quotation Planning
 
Oracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp convertedOracle strategic workforce planning cloud hcmswp converted
Oracle strategic workforce planning cloud hcmswp converted
 
Basics of fdmee
Basics of fdmeeBasics of fdmee
Basics of fdmee
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
Oracle PBCS creating standard application
Oracle PBCS creating  standard applicationOracle PBCS creating  standard application
Oracle PBCS creating standard application
 
Hfm rule custom consolidation
Hfm rule custom consolidationHfm rule custom consolidation
Hfm rule custom consolidation
 
Adding metadata using smartview
Adding metadata using smartviewAdding metadata using smartview
Adding metadata using smartview
 
Hyperion planning weekly distribution
Hyperion planning weekly distributionHyperion planning weekly distribution
Hyperion planning weekly distribution
 
Hyperion planning scheduling data import
Hyperion planning scheduling data importHyperion planning scheduling data import
Hyperion planning scheduling data import
 
Hyperion planning new features
Hyperion planning new featuresHyperion planning new features
Hyperion planning new features
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 

Getting Started with SalesForce CRM Tool

  • 1. Getting Started with SalesForce CRM Working Force.com Migration Utility Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for SalesForce. The document focuses on force.com migration utility. Join our professional training program and learn from experts. History: Version Description Change Author Publish Date 0.1 Initial Draft Chandra Prakash Sharma 10th Oct 2013 0.1 Review#1 Amit Sharma 10th Oct 2013 www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1
  • 2. Contents .........................................................................................................................................................2 Force.com Migration Tool Overview .................................................................................................3 Understanding Metadata API :....................................................................................................3 Installing the Force.com Migration Tool..........................................................................................3 How set ant path :.......................................................................................................................4 ......................................................................................................................................................5 Using the Force.com Migration Tool ..............................................................................................5 SalesForce Connection Information:...........................................................................................5 Constructing a Project Manifest :................................................................................................6 Describing Metadata Types :......................................................................................................7 Listing Components for a Metadata Type :................................................................................8 Creating Retrieve Targets :.........................................................................................................9 Retrieving Metadata from a SalesForce Organization :................................................................10 www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 2
  • 3. Force.com Migration Tool Overview The Force.com Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a SalesForce organization.  Development projects where you need to populate a test environment with large amounts of setup changes — Making these changes using a Web interface could take a long time.  Multistage release processes — A typical development process requires iterative building, testing, and staging before releasing to a production environment. Scripted retrieval and deployment of components can make this process much more efficient.  Repetitive deployment using the same parameters — You can retrieve all the metadata in your organization, make changes, and deploy a subset of components. If you need to repeat this process, it's as simple as calling the same deployment target again.  When migrating from stage to production is done by IT — Anyone that prefers deploying in a scripting environment will find the Force.com Migration Tool a familiar process. Understanding Metadata API : Metadata API contains a set of objects that manage setup and customization information (metadata) for your organizations, and the SOAP calls that manipulate those objects. With Metadata API you can:  Work with setup configuration as XML metadata files  Migrate configuration changes between organizations  Create your own tools for managing organization and application metadata Installing the Force.com Migration Tool Before you install the Force.com Migration Tool you will need Java and Ant installed on your local machine. you can download on this link : http://ant.apache.org/ and also need JDK 1.6.x or later. . http://www.oracle.com/technetwork/java/javase/downloads/index.html 1. Install Java and Ant. 2. Login to a SalesForce organization and download the Force.com Migration Tool, as described in Installing the Force.com Migration Tool. download the Force.com Migration Tool from a SalesForce organization. Click on Setup > Develop > Tools, then click Force.com Migration Tool. see below. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 3
  • 4. Save the .zip file locally and extract the contents to the directory of your choice. Copy ant-salesforce.jar and paste into your Ant installation's lib directory. The lib directory is located in the root folder of your Ant installation. After install Jdk check java version open command prompt then type java -version, you can see below. How set ant path : Syntax Example SET ANT_HOME=my_path_to_ant_folder Ex : SET ANT_HOME= D:cp sharmaswapache-ant-1.9.3-binapache-ant- 1.9.3 SET JAVA_HOME=my_path_to_jdk_folder Ex: C:Program FilesJavajdk1.7.0_45 SET PATH=%PATH%;%ANT_HOME%/bin; %JAVA_HOME%bin; Ex : SET PATH=%PATH%;%ANT_HOME %/bin;%JAVA_HOME%bin; After set path you can check ant version by using this syntax. syntax : ant -version www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 4
  • 5. Using the Force.com Migration Tool The Force.com Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a SalesForce organization. The general procedure you will follow when using the Force.com Migration Tool to copy metadata from one SalesForce organization to another is: 1) Enter credentials and connection information for source SalesForce organization in build.properties 2) Create retrieve targets in build.xml 3) Construct a project manifest in package.xml 4) Run the Force.com Migration Tool to retrieve metadata files from SalesForce 5) Enter credentials and connection information for destination SalesForce organization in build.properties 6) Run the Force.com Migration Tool to deploy metadata files or deletions to SalesForce SalesForce Connection Information: 1. Go to the location where you extracted the Force.com Migration Tool files and open the sample subdirectory. 2. Open build.properties in a text editor and substitute a valid SalesForce username and password. If you are using a security token, paste the 25-digit token value to the end of your password. you can see below. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 5
  • 6. Constructing a Project Manifest : The package.xml file is a project manifest that lists all the components you want to retrieve or deploy in a single request. You can retrieve or deploy only a single package at a time. The following elements may be defined in package.xml : Name Description <fullName> The name of the server-side package to deploy into. If the <fullName> field is omitted, components will not be assigned to a package when deployed, and will be in the unpackaged package. <types> This element contains one or more <members> tags and one <name> tag, and is used to list the metadata components of a certain type to retrieve or deploy. <members> The full name of a component. There is one <members> element defined for each component in the directory. You can replace the value in this member with the wildcard character * (asterisk) instead of listing each member separately. <name> There is one name defined for each component type in the directory. This is a child element of <types>. <version> The Metadata API version number of the files being retrieved or deployed. When deploying, all the files must conform to the same version of the Metadata API. Specifying Standard Objects : To retrieve standard objects and/or custom fields on standard objects, you must name the component in package.xml. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 6
  • 7. Specifying Named Components : To retrieve a component, specify the type of component in the <name> element and declare each component to be retrieved or deployed in the <members> element. The following is a sample package. Specifying all Components of a Type : To retrieve all components of a particular type, use the wildcard symbol (*). For example, to retrieve all custom objects: Specifying Standard Objects : To retrieve standard objects and/or custom fields on standard objects, you must name the component in package.xml. Describing Metadata Types : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 7
  • 8. Field Description username Required. The SalesForce username for login. The username associated with this connection must have the "Modify All Data" permission. password Required. The password you use to log into the organization associated with this project. If you are using a security token, paste the 25-digit token value to the end of your password. serverurl Optional. The SalesForce server URL (if blank, defaults to login.salesforce.com). To connect to a sandbox instance, change this to test.salesforce.com. apiVersion Optional. The API version to use for the metadata. The default is 29.0. resultFilePath Optional. The path of the output file where results are stored. The default output is the console. Directing the output to a file makes it easier to extract the relevant information for your package.xml manifest file. trace Optional. Defaults to false. Prints the SOAP requests and responses to the console. Note that this will show the user's password in plain text during login. Get the list of metadata types enabled for your organization, specify a target in the build.xml file using Listing Components for a Metadata Type : The listMetadata target retrieves property information about metadata components in your organization. This target is useful when you want to identify individual components in package. Field Description username Required. The SalesForce username for login. The username associated with this connection must have the “Modify All Data” permission. password Required. The password you use to log into the organization associated with this project. If you are using a security token, paste the 25-digit token value to the end of your password. serverurl Optional. The SalesForce server URL (if blank, defaults to login.salesforce.com). To connect to a sandbox instance, change this to test.salesforce.com. metadataType Required. The name of the metadata type for which you are retrieving property information; for example, CustomObject for custom objects, or Report for custom reports. folder The folder associated with the component. This field is required for components that use folders, such as Dashboard, Document, Email Template, www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 8
  • 9. or Report. apiVersion Optional. The API version to use for the metadata. The default is 29.0. resultFilePath Optional. The path of the output file where results are stored. The default output is the console. Directing the output to a file makes it easier to extract the relevant information for your package.xml manifest file. trace Optional. Defaults to false. Prints the SOAP requests and responses to the console. Note that this will show the user's password in plain text during login. Get property information for components of one metadata type, such as CustomObject, specify a target in the build.xml file using Creating Retrieve Targets : The build.xml file specifies a series of commands to be executed by Ant. Within the build.xml file are named targets that process a series of commands when you run Ant with a target name. The following parameters may be set for each <sf:retrieve> target : Field Description username Required. The SalesForce username for login. The username associated with this connection must have the “Modify All Data” permission. password Required. The password you use to log into the organization associated with this project. If you are using a security token, paste the 25-digit token value to the end of your password. serverurl Optional. The SalesForce server URL (if blank, defaults to login.salesforce.com). To connect to a sandbox instance, change this to test.salesforce.com. retrieveTarget Required. The root of the directory structure into which the metadata files are retrieved. packageNames Required if unpackaged is not specified. A comma-separated list of the names of the packages to retrieve. apiVersion Optional. The API version to use for the metadata. The default is 29.0. pollWaitMillis Optional. Defaults to 10000. The number of milliseconds to wait between attempts when polling for results of the retrieve request. maxPoll Optional. Defaults to 20. The number of times to poll the server for the results of the retrieve request. singlePackage Optional. Defaults to true. This must be set to false if you are retrieving multiple www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 9
  • 10. packages. If set to false, the retrieved zip file includes an extra top-level directory containing a subdirectory for each package. trace Optional. Defaults to false. Prints the SOAP requests and responses to the console. Note that this will show the user's password in plain text during login. unpackaged Required if packageNames is not specified. The path and name of a file manifest that specifies the components to retrieve. unzip Optional. Defaults to true. If set to true, the retrieved components are unzipped. Retrieving Metadata from a SalesForce Organization : To retrieve Force.com components : 1. Open a command prompt. 2. Run Ant by specifying a target name in build.xml. If this is the first time you are running Ant, use ant retrieveUnpackaged to retrieve unpackaged components specified in package.xml. Running Tests in a Deployment : For deployment to a production organization, all the tests in your organization, except for those that originate from installed If the deployment includes components for any of the following metadata types, all the tests are automatically run.  ApexClass  ApexComponent  ApexPage  ApexTrigger  ArticleType  CriteriaBasedSharingRule  CustomDataType  CustomField  CustomObject  DataCategoryGroup  Flow  InstalledPackage  NamedFilter  OwnerSharingRule  PermissionSet  Profile  Queue  RemoteSiteSettingRecordType  Role  SharingReason www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 10
  • 11.  Territory  Validation Rules  Workflow www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 11