Salesforce.

com: Winter '11

Force.com Migration Tool Guide

Last updated: August 26, 2010
© Copyright 2000-2010 salesforce.com, inc. All rights reserved. Salesforce.com is a registered trademark of salesforce.com, inc., as are other

names and marks. Other marks appearing herein may be trademarks of their respective owners.

Table of Contents

Table of Contents
Chapter 1: Development as a Service (DaaS)................................................................................3
Force.com Migration Tool.............................................................................................................................................3 Understanding Package and Directory Structure..........................................................................................................3

Chapter 2: Installing the Force.com Migration Tool......................................................................5
Prerequisites for Using the Force.com Migration Tool..................................................................................................5 Verifying Java Installation..................................................................................................................................5 Installing Java.....................................................................................................................................................5 Verifying Ant Installation..................................................................................................................................5 Installing and Configuring Ant.........................................................................................................................6 Installing the Force.com Migration Tool.......................................................................................................................6 About the Contents of the Force.com Migration Tool......................................................................................6

Chapter 3: Using the Force.com Migration Tool...........................................................................8
Entering Salesforce.com Connection Information........................................................................................................8 Constructing a Project Manifest....................................................................................................................................9 Specifying Named Components......................................................................................................................12 Specifying all Components of a Type..............................................................................................................12 Specifying Standard Objects............................................................................................................................13 Getting Information About Metadata Types...................................................................................................13 Describing Metadata Types.............................................................................................................................13 Listing Components for a Metadata Type.......................................................................................................14 Creating Retrieve Targets............................................................................................................................................15 Retrieving Unpackaged Components..............................................................................................................16 Retrieving Managed or Unmanaged Packages.................................................................................................16 Retrieving Components in Bulk......................................................................................................................17 Retrieving Metadata from a Salesforce.com Organization..........................................................................................18 Editing Metadata........................................................................................................................................................18 Deleting Files from an Organization...........................................................................................................................18 Deploying Changes to a Salesforce.com Organization................................................................................................19 Deploying Components...................................................................................................................................20 Deploying Code...............................................................................................................................................21 Running Tests in a Deployment......................................................................................................................21 Checking the Status of a Task.....................................................................................................................................22

Chapter 4: Common Migration Issues........................................................................................23
Common Metadata Issues...........................................................................................................................................23 Connection Problems..................................................................................................................................................24 Testing in Apex............................................................................................................................................................25

Glossary...................................................................................................................................26

i

Table of Contents

Index......................................................................................................................................................41

ii

com components. it's as simple as calling the same deployment target again. make changes.com Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce.com Migration Tool retrieves a set of components. workflow rules. 3 . and staging before releasing to a production environment.com Web application. Multistage release processes — A typical development process requires iterative building. when making setup changes in a sandbox organization and then promoting those changes to a production environment. such as code editors. There are three kinds of packages: • Unpackaged—Components that live natively in your organization. Force. go in the unpackaged package. With the point-and-click tools in the Salesforce.com Migration Tool The Force. and deploy a subset of components. The Force. testing. Scripted retrieval and deployment of components can make this process much more efficient. Packages may be local (created in your Salesforce organization) or installed from Force.com organization. see Using the Force. If you need to repeat this process. and many other Force.Chapter 1 Development as a Service (DaaS) Force.com Development as a Service (DaaS) is a suite of features that enables you to use of traditional development practices for creating on-demand applications. An important use of DaaS features is when migrating metadata components from one organization to another. Understanding Package and Directory Structure The Metadata API functions in a package-centric manner. Components may be in one or more packages. Apex classes and triggers. Repetitive deployment using the same parameters — You can retrieve all the metadata in your organization.com AppExchange.com Migration Tool is especially useful in the following scenarios: • • 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. DaaS expands the development process to include external tools. that set will be limited to what’s in a single package or what’s in no package at all. • • For more information.com Migration Tool on page 8. source control systems. for example. you can create or modify the setup information of your organization including custom objects and fields. such as standard objects. Whenever the Force. 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. and batch scripts to facilitate development and deployment. or in no package at all.

An organization can create a single managed package that can be downloaded and installed by many different organizations. A package must be managed for it to support upgrades. managed packages obfuscate certain components (like Apex) on subscribing organizations. allowing the managed package to be upgraded later. the components can be edited in the organization they are installed in. Unmanaged packages should not be used to migrate components from a sandbox to production organization. instead use “Change Sets” in the Salesforce. The developer who created and uploaded the unmanaged package has no control over the installed components. and are associated with a namespace and possibly a License Management Organization. They differ from unmanaged packages in that some components are locked.com online help Managed package—A collection of application components that are posted as a unit on AppExchange. Unmanaged packages do not include locked components and cannot be upgraded. so as to protect the intellectual property of the developer. 4 .Development as a Service (DaaS) Understanding Package and Directory Structure • • Unmanaged package—Unmanaged packages are typically used to distribute open-source projects or application templates to provide developers with the basic building blocks for an application. and can't change or upgrade them. In addition. Once the components are installed from an unmanaged package.

com Migration Tool Before you install the Force. Installing Java In a Web browser.Chapter 2 Installing the Force. navigate to http://java.0_01-b06) Java HotSpot(TM) Client VM (build 1. Install Java and Ant.com/javase/downloads/index.com organization.5. Then you can download the Force.com Migration Tool Before you can use the Force. Verifying Java Installation To see if you have Java installed: 1.com Migration Tool.com Migration Tool you will need Java and Ant installed on your local machine.com Migration Tool.5. 1. Open a command prompt. type java -version and press Enter. You may not need to install Java and Ant if you already have them on your computer. mixed mode) The Force.jsp and install the latest version of the Java JDK on the deployment machine.com Migration Tool from a Salesforce. When you are finished with the installation.com Migration Tool works with Java version 1. Log into a Salesforce.com organization and download the Force. 2. Verifying Ant Installation To see if you have Ant installed: 1. The output should look something like the following: java version "1.sun. so first verify the installation from a command prompt. verify the installation by typing java -version at a command prompt. as described in Installing the Force. 2. as described in Prerequisites for Using the Force.x or later.0_01" Java(TM) SE Runtime Environment (build 1.0_01-b06.5.com Migration Tool.x or later. 5 .5. Prerequisites for Using the Force. Open a command prompt. At the prompt.com Migration Tool you must have Java and Ant installed and configured correctly. If you have an earlier version. you will need to install Java 1.5.

2. the following folders and files are written to the location you specified: • • • A Readme. Save the .6 or newer to a directory of your choice: http://ant. you may still need to put the bin directory on your path.cls and SampleFailingTestClass.7. and then click Force. you may also need to set the ANT_HOME and JAVA_HOME environment variables. Installing the Force.org/manual/install. 4. Copy ant-salesforce.5.html.jar A sample folder containing: A codepkg\classes folder that contains SampleDeployClass.com Migration Tool Installing and Configuring Ant 2.apache. Note: If you do not have Ant installed.cgi.com organization on your deployment machine. For additional information. Add the bin directory to your path.cls A codepkg\triggers folder that contains SampleAccountTrigger. Note: Even if you have Ant installed. create an ANT_HOME environment variable and set the value to where you have installed Ant.com Migration Tool.com Migration Tool. This directory will be known as ANT_HOME. For details.0 compiled on December 13 2006 If the Ant version is 1.com Migration Tool zip files.) 3. About the Contents of the Force. On a Windows operation system. 2. see http://ant.html file that explains how to use the tools A Jar file containing the ant task: ant-salesforce. Log into a Salesforce. (Only the bin and lib directories are required to run Ant.apache.org/bindownload.zip file locally and extract the contents to the directory of your choice.jar and paste into your Ant installation's lib directory. Click Your Name ➤ Setup ➤ Develop ➤ Tools. Once the files are on your computer. there is no further installation required. see Prerequisites for Using the Force.com Migration Tool When you extract the Force. you will need to download the latest version of Ant. At the prompt.Installing the Force. type ant -version and press Enter.trigger A mypkg\objects folder that contains the custom objects used in the examples A removecodepkg folder that contains XML files for removing the examples from your organization 6 .com Migration Tool To download and install the Force. Installing and Configuring Ant To install Ant: 1. Also create a JAVA_HOME environment variable and set the value to the location of your JDK. If you are using a Windows operation system. The output should look something like the following: Apache Ant version 1.x or earlier. Download Apache Ant version 1. 3. see Installing and Configuring Ant.com Migration Tool: 1. The lib directory is located in the root folder of your Ant installation.

xml A sample build.com Migration Tool About the Contents of the Force.Installing the Force.properties file that you must edit.com Migration Tool - A sample build. in order to run the sample ant tasks in build. that exercises the deploy and retrieve API calls 7 .xml file. specifying your credentials.

The salesforce server URL. 3. this is only enabled for System Administrator users.com organization in build. You can use the Force.com Migration Tool to deploy metadata files or deletions to Salesforce.com. Parameter sf. The password you use to log into the organization associated with this project. The general procedure you will follow when using the Force. create scripted deployment.com organization.com organization: 1. then your sandbox username is foo@salesforce. Go to the location where you extracted the Force.Chapter 3 Using the Force. If you are using a security token.salesforce.com. and repeat deployment patterns. 2. if your production username is foo@salesforce. 5. Use https://login. 2. paste the 25-digit token value to the end of your password.com to connect to a production or Developer Edition organization.com.properties to point to a Salesforce.bar. 4.username Value The salesforce. paste the 25-digit token value to the end of your password.com Migration Tool to retrieve metadata files from Salesforce.com Entering Salesforce.com Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce.serverurl 8 . and one of your sandboxes is called bar. For example. The username associated with this connection must have “Modify All Data” permissions on their profile.com organization to another is: 1.properties Create retrieve targets in build. change this to https://test.xml Run the Force.properties Run the Force.com Migration Tool to retrieve components. Enter credentials and connection information for source Salesforce. When connecting to a sandbox instance your sandbox name is appended to your username.com Enter credentials and connection information for destination Salesforce.properties in a text editor and substitute a valid Salesforce. If you are using a security token.com username for login. To connect to a sandbox instance. sf.com username and password.xml Construct a project manifest in package.com Migration Tool files and open the sample subdirectory.com Migration Tool to copy metadata from one Salesforce.com Connection Information In order to retrieve or deploy metadata components.com Migration Tool The Force. you need to edit build.salesforce.password sf.com organization in build. Open build. Typically. 6.

This field is not used for retrieve. all the files must conform to the same version of the Metadata API. Contains the type of the component. If the <fullName> field is omitted. <types> <members> <name> <version> Component Types The following table lists the component types that can be defined by the <name> element in package. The following elements may be defined in package. 9 . and will be in the unpackaged package. This is a child element of <types>. This is a child element of <types>. You must dot-qualify the object name before the component name.xml: Name <fullName> Description The name of the server-side package to deploy into.com Migration Tool Constructing a Project Manifest Constructing a Project Manifest The package. components will not be assigned to a package when deployed. There is one <members> element defined for each component in the directory. The Metadata API version number of the files being retrieved or deployed. There is one name defined for each component type in the directory. You can retrieve or deploy only a single package at a time. The full name of a component. When deploying. You must dot-qualify the object name before the component name. Analytic Snapshot AnalyticSnapshot Apex class Article Type Visualforce component Visualforce page Apex trigger Business process ApexClass ArticleType ApexComponent ApexPage ApexTrigger BusinessProcess analyticsnapshots no classes objects components pages triggers objects yes yes yes yes yes no This type is retrieved or deployed as part of a custom object file. You can replace the value in this member with the wildcard character * (asterisk) instead of listing each member separately. and is used to list the metadata components of a certain type to retrieve or deploy. for example CustomObject or Profile. This element contains one or more <members> tags and one <name> tag.xml: Table 1: Available Metadata Types Component Action Override XML <name> Metadata Folder Type ActionOverride objects * Notes no This type is retrieved or deployed as part of a custom object file.Using the Force.xml file is a project manifest that lists all the components you want to retrieve or deploy in a single request.

You must dot-qualify the object name before the component name.Using the Force. Individual custom fields cannot be retrieved with the wildcard (*) symbol. You must dot-qualify the object name before the component name.com Migration Tool Constructing a Project Manifest Component XML <name> Metadata Folder Type * yes Notes Custom application CustomApplication applications Custom field CustomField objects no Custom fields are retrieved or deployed as part of a custom object file. and only custom fields and standard picklist fields are included. yes yes no DataCategoryGroup datacategorygroups yes Includes a category group and its categories. no This type is retrieved or deployed as part of a custom object file. Lookup filter NamedFilter objects Picklist Picklist objects 10 . Document EmailTemplate document email no no EntitlementTemplate entitlementTemplates yes HomePageComponent homePageComponents yes homePageLayouts yes layouts letterhead objects Home page layout HomePageLayout Page layout Letterhead List view Layout Letterhead ListView yes no no This type is retrieved or deployed as part of a custom object file. unless their object is named in the CustomObject section. Custom label Custom object or standard object CustomLabels CustomObject labels objects Custom object translation CustomObjectTranslation objectTranslations yes Custom page web CustomPageWebLink weblinks link Custom site Custom tab Dashboard Data Categories Document Email template Entitlement Template Home page component CustomSite CustomTab Dashboard sites tabs dashboards yes Web links are defined in a home page component. and currencies. yes Custom labels that can be localized for use in different languages.xml. . but must be explicitly named in package. but must be explicitly named in package. You must dot-qualify the object name before the component name. countries. You must dot-qualify the object name before the component name. yes Standard objects cannot be retrieved with the wildcard (*) symbol. no This type is retrieved or deployed as part of a custom object file.xml.

including WorkflowAlert. no This type is retrieved or deployed as part of a custom object file.com Migration Tool Constructing a Project Manifest Component Portal Profile XML <name> Metadata Folder Type Portal Profile portals profiles * yes Notes yes The contents of a profile retrieved depends on the contents of the organization. You must dot-qualify the object name before the component name. For example. You must dot-qualify the object name before the component name.WorkflowRule.workflow file is a container for the individual workflow components associated with an object. You must dot-qualify the object name before the component name. no This type is retrieved or deployed as part of a custom object file. profiles will only include field-level security for fields included in custom objects returned at the same time as the profiles. Scontrol Search layouts Scontrol SearchLayouts scontrols objects Sharing reason SharingReason objects Sharing recalculation Static resource Translation Workbench Validation rule SharingRecalculation objects StaticResource Translations ValidationRule staticResources yes translations objects yes no This type is retrieved or deployed as part of a custom object file. You must dot-qualify the object name before the component name. You must dot-qualify the object name before the component name. WorkflowOutboundMessage.Using the Force. yes A . WorkflowFieldUpdate. no This type is retrieved or deployed as part of a custom object file. and WorkflowTask. Record type RecordType objects Remote site setting RemoteSiteSetting remoteSiteSettings yes Report Report type Report ReportType reports reportTypes no yes Custom report types allow you to build a framework from which users can create and customize reports. You must dot-qualify the object name before the component name. Web link Weblink objects Workflow Workflow workflows 11 . yes no This type is retrieved or deployed as part of a custom object file. yes This type is retrieved or deployed as part of a custom object file.

com Migration Tool Specifying Named Components Specifying Named Components To retrieve a component.Using the Force. To retrieve a standard object. use the wildcard symbol (*). 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. you must explicitly name the object in package.0" encoding="UTF-8"?> <Package xmlns="http://soap.com/2006/04/metadata"> <types> <members>Opportunity.com/2006/04/metadata"> <types> <members>*</members> <name>CustomObject</name> </types> <version>20.xml project manifest that names two custom objects to be retrieved or deployed: <?xml version="1. to retrieve all custom objects: <?xml version="1.0</version> </Package> Specifying all Components of a Type To retrieve all components of a particular type. For example.0" encoding="UTF-8"?> <Package xmlns="http://soap. Likewise.sforce. if you want to retrieve custom fields defined on standard objects.0</version> </Package> The wildcard symbol does not apply to all metadata types. For example. the following code retrieves a validation rule called ValidationRuleName on the Opportunity object: <?xml version="1. you must name the object and field.com/2006/04/metadata"> <types> <members>MyCustomObject__c</members> <members>MyHelloWorldObject__c</members> <name>CustomObject</name> </types> <version>20.ValidationRuleName</members> <name>ValidationRule</name> </types> <version>20. 12 .0</version> </Package> Some metadata components are sub-components of another component.sforce. using the wildcard with the CustomObject type name will not retrieve standard objects.xml. This means you must dot-qualify the sub-component with the parent component name. The following metadata components are defined as part of an object: • • • • • CustomField Picklist RecordType Weblink ValidationRule For example.sforce.0" encoding="UTF-8"?> <Package xmlns="http://soap.

Typically. The build. Optional.salesforce. The API version to use for the metadata.salesforce. this is only enabled for System Administrator users. The Salesforce. There are a couple of helper targets. The Salesforce. Within the build.0</version> </Package> Note: Custom objects and standard objects should be specified in the same <types> section. the one containing <name>CustomObject</name>.com server URL (if blank.xml file are named targets that process a series of commands when you run Ant with a target name.com. password serverurl apiVersion 13 . The default is 20.xml file specifies a series of commands to be executed by Ant.0" encoding="UTF-8"?> <Package xmlns="http://soap. defaults to login.com username for login. Describing Metadata Types The describeMetadata target returns a list of metadata types that are enabled for your organization. Optional.xml manifest file before you settle on the final version that retrieves or deploys the metadata that you want. This target is useful when you want to identify the syntax needed for a metadata type in a <name> element in package. The password you use to log into the organization associated with this project. as well as the entire Account object. The username associated with this connection must have “Modify All Data” permissions on their profile. If you are using a security token. change this to test.0.xml. <sf:describeMetadata> and <sf:listMetadata>.com/2006/04/metadata"> <types> <members>Case.com Migration Tool Specifying Standard Objects Specifying Standard Objects To retrieve standard objects and/or custom fields on standard objects. you must name the component in package. The following parameters may be set for each <sf:describeMetadata> target: Field username Description Required.xml. Getting Information About Metadata Types You sometimes need to experiment with the composition of your package. that are useful for gathering the relevant information during this experimentation period. on the Case object.sforce. The following package.Using the Force.xml file will retrieve a single field EngineeringReqNumber__c. Required. <?xml version="1.EngineeringReqNumber__c</members> <name>CustomField</name> </types> <types> <members>Account</members> <name>CustomObject</name> </types> <version>20. paste the 25-digit token value to the end of your password. CustomObject for custom objects or Layout for page layouts.com). for example. To connect to a sandbox instance.

com. Optional. Directing the output to a file makes it easier to extract the relevant information for your package. you could use this target to return a list of names of all the CustomObject or Layout components in your organization. for example. The default output is the console. The following parameters may be set for each <sf:listMetadata> target: Field username Description Required. The folder associated with the component. This field is required for components that use folders. The Salesforce.com server URL (if blank. password serverurl metadataType folder apiVersion resultFilePath trace 14 . see Component Types on page 9. Defaults to false. Document. and use this information to make a subsequent retrieval to return a subset of these components.xml manifest file. Required. or Report for custom reports. If you are using a security token. Note that this will show the user's password in plain text during login. The path of the output file where results are stored.salesforce. Optional.password}" serverurl="${sf.salesforce.xml for a retrieval or if you want a high-level view of particular metadata types in your organization. EmailTemplate. The name of the metadata type for which you are retrieving property information. Directing the output to a file makes it easier to extract the relevant information for your package. change this to test. CustomObject for custom objects.serverurl}" resultFilePath="describeMetadata/describe. The default is 20. this is only enabled for System Administrator users. paste the 25-digit token value to the end of your password. such as Dashboard. For a full list of allowed values. <target name="describeMetadata"> <sf:describeRetrieve username="${sf. trace To get the list of metadata types enabled for your organization.Using the Force. The username associated with this connection must have “Modify All Data” permissions on their profile. specify a target in the build.com). The default output is the console.xml manifest file. Optional. Prints the SOAP requests and responses to the console.xml file using <sf:describeMetadata>. Prints the SOAP requests and responses to the console. Defaults to false. This target is useful when you want to identify individual components in package. The password you use to log into the organization associated with this project. The Salesforce. To connect to a sandbox instance.com username for login.username}" password="${sf.log"/> </target> Listing Components for a Metadata Type The listMetadata target retrieves property information about metadata components in your organization. Required. or Report. Note that this will show the user's password in plain text during login. defaults to login. Optional. Typically. The API version to use for the metadata. Optional. The path of the output file where results are stored.com Migration Tool Listing Components for a Metadata Type Field resultFilePath Description Optional.0. For example.

such as CustomObject.salesforce. but not both. The root of the directory structure into which the metadata files are retrieved. The number of milliseconds to wait between attempts when polling for results of the retrieve request.0. defaults to login. Required if unpackaged is not specified.password}" serverurl="${sf.serverurl}" metadataType="CustomObject" resultFilePath="listMetadata/list. Optional.log"/> </target> The following example uses a component that resides in a folder. Defaults to 10000.xml file specifies a series of commands to be executed by Ant.serverurl}" metadataType="Report" folder="Marketing_Reports" resultFilePath="listMetadata/list.salesforce. change this to test. Optional. The password you use to log into the organization associated with this project. <target name="listMetadata"> <sf:listMetadata username="${sf.com server URL (if blank. You must specify either packageNames or unpackaged. The client continues to poll the server up to the limit defined by maxPoll. Required.password}" serverurl="${sf. A comma-separated list of the names of the packages to retrieve. The username associated with this connection must have “Modify All Data” permissions on their profile.log"/> </target> Creating Retrieve Targets The build. <target name="listMetadata"> <sf:listMetadata username="${sf.username}" password="${sf.xml file using <sf:listMetadata>. If you are using a security token. To connect to a sandbox instance. The default is 20. The Metadata API version to use for the retrieved metadata files.com Migration Tool Creating Retrieve Targets To get property information for components of one metadata type.xml file are named targets that process a series of commands when you run Ant with a target name. Optional. paste the 25-digit token value to the end of your password. Typically. this is only enabled for System Administrator users. password serverurl retrieveTarget packageNames apiVersion pollWaitMillis 15 .com. Required. Within the build.com username for login.Using the Force.com).username}" password="${sf. The Salesforce. specify a target in the build. The Salesforce. The following parameters may be set for each <sf:retrieve> target: Field username Description Required.

This must be set to false if you are retrieving multiple packages. Apexclasses and other metadata components that exist natively in your organization. However.serverurl}" retrieveTarget="projectFolder" unpackaged="unpackaged/package. you can use the Force. Defaults to true. Required if packageNames is not specified. Optional. Defaults to false. use a build. via Force. specify a packageNames parameter in the build.com Migration Tool to freely retrieve and deploy packaged metadata without using AppExchange.xml"/> </target> The salesforce-ant. Optional. In the code above. sf:retrieve is an Ant task.xml file. If set to false. For example: <target name="retrieveUnpackaged"> <mkdir dir="projectFolder"/> <sf:retrieve username="${sf.username}" password="${sf. The full list of metadata Ant tasks are described in the Metadata API Developer's Guide. The path and name of a file manifest that specifies the components to retrieve.serverurl}" retrieveTarget="projectFolder" packageNames="mySourcePackage"/> </target> 16 . You retrieve both managed and unmanaged packages in the same way.xml file. custom objects. The wait time between successive poll attempts is defined by pollWaitMillis. Note that this will show the user's password in plain text during login. Optional.xml target that contains the unpackaged attribute that points to a package. Prints the SOAP requests and responses to the console. To retrieve unpackaged components.jar file contains Ant tasks for accessing the Metadata API.username}" password="${sf. Defaults to true. and not within a package. the retrieved components are unzipped. If set to false. Retrieving Managed or Unmanaged Packages Packages are useful for distributing related bundles of metadata across multiple instances or organizations.password}" serverurl="${sf.password}" serverurl="${sf. To retrieve a package. the retrieved zip file includes an extra top-level directory containing a subdirectory for each package. the retrieved components are saved as a zip file in the retrieveTarget directory. You must specify either unpackaged or packageNames. singlePackage trace unpackaged unzip Retrieving Unpackaged Components The unpackaged package contains all of the standard objects.com AppExchange. The number of times to poll the server for the results of the retrieve request.com Migration Tool Retrieving Unpackaged Components Field maxPoll Description Optional. If set to true.Using the Force. For example: <target name="retrieveNamedPackage"> <sf:retrieve username="${sf. but not both. Defaults to 20.

com Migration Tool Retrieving Components in Bulk Retrieving Components in Bulk This target is the optimal way to download a large number of components of a single metadata type. the retrieved components are unzipped. The password you use to log into the organization associated with this project. The Salesforce. The Metadata API version to use for the retrieved metadata files. specify a target in the build. change this to test. paste the 25-digit token value to the end of your password.xml file using <sf:bulkRetrieve>. into a set of local files. Typically. such as custom reports.0. password serverurl retrieveTarget metadataType containingFolder batchSize apiVersion maxPoll unzip To retrieve custom report components in bulk. Required. or Report for custom reports. Optional. Optional. defaults to 10. If set to false. Optional. The default is 20.com. Required. The number of items to retrieve while doing multi-part retrieve.com). see Component Types on page 9. this is only enabled for System Administrator users. The root of the directory structure into which the metadata files are retrieved.com server URL (if blank. If the metadata is contained in a folder. for example. If you are using a security token. The name of the metadata type to be retrieved. <target name="bulkRetrieve"> <sf:bulkRetrieve username="${sf. Optional. Optional. Optional. To connect to a sandbox instance. The username associated with this connection must have “Modify All Data” permissions on their profile. this parameter should be the name of the folder from which the contents are retrieved.password}" serverurl="${sf. The wait time is doubled for each successive poll attempt up to maximum of 30 seconds between poll attempts.username}" password="${sf. Required. For a full list of allowed values.salesforce.serverurl}" metadataType="Report" retrieveTarget="retrieveUnpackaged"/> </target> 17 . If set to true.Using the Force. The clients waits for two seconds after the first poll attempt. The following parameters may be set for each <sf:bulkRetrieve> target: Field username Description Required. The number of times to poll the server for the results of the retrieve request. The Salesforce. Defaults to true.salesforce. defaults to login. Defaults to 20. the retrieved components are saved as a zip file in the retrieveTarget directory.com username for login. CustomObject for custom objects.

except that wildcards are not supported. While you can use package.xml contains a number of useful targets for various retrieve() and deploy() options that you can modify or use as is. you cannot use it to delete them. Open a command prompt.xml.xml. The Metadata API can deploy up to 50 MB.sforce.com Migration Tool Retrieving Metadata from a Salesforce. which can cause problems in the XML metadata.0</version> </Package> 18 .xml to add components.com/2006/04/metadata"> <types> <members>MyCustomObject__c</members> <name>CustomObject</name> </types> <version>20.com components: 1. Note: • The sample build. use ant retrieveUnpackaged to retrieve unpackaged components specified in package.xml. 2. • Editing Metadata You can use any UTF-8 text editor to make changes to the files you retrieve.com Organization Retrieving Metadata from a Salesforce.0" encoding="UTF-8"?> <Package xmlns="http://soap. Caution: Text editors that do not natively support UTF-8 may insert a byte order mark (BOM) at the top of the file. If this is the first time you are running Ant. To delete files. the rest of the deletions will be attempted. and retrieve up to 2500 files or 400 MB at one time. or you should retrieve batches of components using the bulkRetrieve target.Using the Force. Deleting Files from an Organization The package.xml.xml file is a project manifest that lists all the components you want to retrieve or deploy.xml file that names a single custom object to be deleted: <?xml version="1. enter ant -p at the command line. The following is a sample destructiveChanges.com Organization To retrieve Force. The format of the delete manifest is the same as package.xml. you should use the listMetadata target to identify the subset of files that you want to retrieve. Run Ant by specifying a target name in build. To see a list of all of your named targets in build. you must create a delete manifest called destructiveChanges. If you are working with a large number of components. Note: If you try to delete components that do not exist in the organization.

For deployment to a production organization. Optional. as opposed to warnings. all tests. Defaults to false. Defaults to false. The username associated with this connection must have “Modify All Data” permissions on their profile. Optional. Note that deployment may succeed even if you stop waiting. Specifies the path of the metadata zip file to be deployed. If there are errors. Declares that the zipFile or deployRoot parameter points to a directory structure with a single package.salesforce.com. this is only enabled for System Administrator users. Defaults to false. The following parameters may be set for each deploy target: Field username Description Required. Defaults to false. Defaults to false. Optional.salesforce. defaults to www.Using the Force. Defaults to 20. Do not use this parameter for deployment to production organizations. If false. Typically.com Organization Deploying Changes to a Salesforce. Optional. The number of times to poll the server for the results of the deploy request. Specifies the root of the directory tree of files to deploy. This setting indicates that a deployment should succeed even if there are warnings (true) or that one or more warnings will cause the deployment to fail and roll back (false). Specifies whether a deploy should continue even if files present in the zip file are not specified in package. Required. If any of these tests password serverurl pollWaitMillis checkOnly maxPoll deployRoot zipFile singlePackage allowMissingFiles autoUpdatePackage ignoreWarnings rollbackOnError runAllTests 19 . Do not use this parameter for deployment to production organizations. as opposed to a set of packages.com server URL (if blank.xml. except for those that originate from installed managed packages. Indicates whether any failure causes a complete rollback (true) or not (false). Set to true to check the validity of the deployed files without making any changes in the organization.com Migration Tool Deploying Changes to a Salesforce.xml file specifies targets to retrieve and deploy. the deployment will always fail and roll back. If you are using a security token. Optional. This parameter must be set to true if you are deploying to a production organization. The number of milliseconds to wait when polling for results of the deployment. You must define a value for either zipFile or deployRoot. The Salesforce. change this to test. This will not deploy any components or change the organization in any way. Specifies whether a deploy succeeds even if files that are specified in package. Optional. Defaults to true.. whatever set of actions can be performed without errors are performed. Optional. Optional. You must define a value for either zipFile or deployRoot. Defaults to 10000. Defaults to false. To connect to a sandbox instance. The password you use to log into the organization associated with this project. The Salesforce.com username for login. Optional.com). If set to true. Optional. Note that deployment may succeed even if you stop waiting. are automatically run regardless of this argument. all tests are run after deploy. and errors are returned for the remaining actions. paste the 25-digit token value to the end of your password. Required if zipFile is not specified. Required if deployRoot is not specified.com Organization The build.xml are not in the zip file.

undeployCode — deletes classes and triggers in the removecodepkg directory specified by the destructiveChanges.xml target.com Migration Tool comes with a sample build. runTest Optional child elements. so the Force.password}" serverurl="${sf. Optional. but by the project manifest (package. the deployment is rolled back and no changes will be made to your organization.username}" password="${sf. The debug logging level for running tests. Some source control systems. but lists components to be deleted. A list of Apex classes containing tests run after deploy.) or ending with a tilde (~) when deploying files. A sample deployment target follows: <target name="deployUnpackaged"> <sf:deploy username="${sf. The default is None. see Deleting Files from an Organization on page 18. Deploying Components You can deploy any set of components as a package or into your organization directly in the unpackaged package.com Migration Tool ignores them. Optional. Prints the SOAP requests and responses to the console. deployCodeFailingTest — deploys code that fails testing requirements.com Migration Tool Deploying Components Field Description fail when the rollbackOnError parameter is set to true.xml manifest. The package used is not determined by the build. such as Subversion.serverurl}" deployroot="projectFolder"/> </target> 20 .xml.xml). Valid options are: • None • Debugonly • Db • Profiling • Callout • Detail trace logType Note: The Force.com Migration Tool ignores any files or folders with a name starting with a period (.xml file that lists several deployment targets. The Force. deployCode — deploys the contents of the codepkg package specified in the target. A description of the sample targets follows: • • • deployUnpackaged — deploys unpackaged components specified in the target. These files can cause issues during deployment to Salesforce. create files or folders with names starting with a period. Defaults to false. but does not deploy any components. For • • more information. Note that this will show the user's password in plain text during login.Using the Force. This file is similar to package.com. the deployment is rolled back and no changes will be made to your organization. If any of these tests fail when the rollbackOnError parameter is set to true. deployCodeCheckOnly — verifies that deployment will work. You will want to create your own custom targets using the sample targets as starting points. strictly for demonstration purposes.

Running Tests in a Deployment For deployment to a production organization. A portion of a build.serverurl}" deployroot="codepkg"> <runTest>SampleDeployClass</runTest> </sf:deploy> </target> Note: When deploying to a production organization. If any of the tests fail. However. no tests are run for the following deployments: • • One ApexComponent component 100 Report components and 40 Dashboard components All tests are automatically run for the following deployments: • • • • One CustomField component One ApexComponent component and one ApexClass component Five CustomField components and one ApexPage component 100 Report components. <target name="deployCode"> <sf:deploy username="${sf. no tests are run. all the tests in your organization.username}" password="${sf. are automatically run. so that you can run tests as part of the deployment. with a target named deployCode that deploys the contents of the codepkg package and runs the tests for one class. There is an exception to this rule if you are deploying components for one or more of the following metadata types: • • • • • • • ApexComponent ApexPage Dashboard EmailTemplate Report Scontrol StaticResource If your deployment consists entirely of components for one or more of these metadata types. but you may find it useful to create separate targets for deploying Apex. For example. all the tests are automatically run.password}" serverurl="${sf.Using the Force. 40 Dashboard components. if the deployment includes components for any other metadata type.com Migration Tool Deploying Code Deploying Code You can deploy metadata components and Apex at the same time. You cannot specify which tests to run. except for those that originate from installed managed packages. and one CustomField component 21 . the entire deployment will roll back.xml file is listed below. all Apex test methods are run automatically.

com.com Migration Tool outputs the request ID for each deploy or retrieve task included in the target. the Force.com Migration Tool Checking the Status of a Task Checking the Status of a Task When you run a target. You should not use this command with the bulkRetrieve task also as this task batches retrievals in multiple requests. use the following command: ant -Dsf. if you run the deployZip target. you can also click Your Name ➤ Setup ➤ Deploy ➤ Monitor Deployments. To check the status of a run target. To track the status of deployments from within Salesforce. For example. You can use the request ID to check the status of a deploy or retrieve task.com Migration Tool on your machine and Salesforce.com. you can run the following command to check the status of the retrieval: ant -Dsf.asyncRequestId=04sx00000002aGuAAI deployZip Note: You should not use this command with targets that contain multiple retrieve or deploy tasks. This is particularly useful if a client is running for a long time and there is a network issue that breaks the connectivity between the Force.asyncRequestId=requestID targetName Use the requestID that was printed out when you ran the target. 22 .Using the Force.

and WorkflowTask. For more information. To retrieve all workflows. profiles will only include field-level security for fields included in custom objects returned at the same time as the profiles. These issues can be grouped into three categories: • • • Metadata . and may not use the wildcard symbol. WorkflowOutboundMessage. include the following XML in package.Problems connecting to an organization or polling for results Testing and Code Coverage . to retrieve all objects. 23 . This means you must dot-qualify the component name with the object name in package. in order to permit upgrades. you will not retrieve standard objects. are not exposed in the Metadata API. see Constructing a Project Manifest on page 9. Managed packages are packages that can be upgraded in the installer's organization. To retrieve custom fields on standard objects. To migrate reports or documents you must move them to a public folder. Personal folders — Users' personal folders. WorkflowRule. Profiles and field-level security — The contents of a retrieved profile depend on the other contents of the retrieve request. Picklist.workflow file is a container for the individual workflow components associated with an object.com AppExchange. see Constructing a Project Manifest on page 9. Workflow — A .Special considerations for dealing with certain metadata components Connectivity . including WorkflowAlert. For more information. They differ from unmanaged packages in that some components are locked. or distributed on Force. Understanding packages — Packages are used to bundle related components so they can be shared with multiple organizations. and ValidationRule. For example.Chapter 4 Common Migration Issues There are a number of common issues you may run into when migrating metadata and deploying changes. see Profile in the Metadata API Developer's Guide. Weblink. Metadata components that are not in any package can be accessed with the unpackaged attribute of sf:retrieve and sf:deploy.xml: <types> <members>*</members> <name>Workflow</name> </types> • • • • • Retrieving or deploying components that depend on an object definition — The following metadata components are dependent on a particular object for their definition: CustomField. RecordType. for both reports and documents.Testing Apex before deployment Common Metadata Issues The most common metadata issues are detailed below: • Retrieving custom fields on standard objects — When you use the wildcard symbol in package. or custom fields on standard objects. WorkflowFieldUpdate.xml.xml.

the request is sent asynchronously. waiting 10 seconds between them) to complete before timing out. maxPoll — The number of polling attempts to be performed before aborting. For sandbox environments. Password — Verify that your password is correct for this account. security token. To reset your security token.serverurl value for production is https://login.com.password}" serverurl="${sf. The server URL is different for sandbox and production environments.salesforce. For long-running processes. this means the Force. The default value is 20.com.properties. When connecting to a sandbox instance your sandbox name is appended to your username. or wait until the lockout period expires. increase this number to reduce the total number of - polling requests. it is important to tune your pollWaitMillis and maxPoll parameters if you receive time-out errors: pollWaitMillis — The number of milliseconds to wait between polls for retrieve/deploy results.properties: Username — Verify that your username is correct on this account. If the deploy fails after timing out. they do not have to be specified. For example. click Your Name ➤ Setup ➤ My Personal Information ➤ Reset Security Token. Note that you security token is appended to the end of your pasword. If the deploy succeeds. 24 .salesforce. the value is https://test. the server will process a deploy() to completion even if the Force. if your production username is foo@salesforce. To add these parameters. and may not exist on your named targets. there is no way to retrieve the error message from the server. and one of your sandboxes is called bar. For this reason. Locked out — If you unsuccessfully attempt to log into an organization too many times. you will need to follow the Ant Proxy Configuration instructions. When combined with the default value of pollWaitMillis (10000). unpackaged="unpackaged/package. and click Reset Security Token. meaning that the response is not returned immediately.username}" password="${sf. which count against your daily API limits.com. The default value is 10000 milliseconds (ten seconds). The number of times you may fail to connect and the lockout duration depend on your organization settings. In build. the changes will be committed to the server. password.bar.com Migration Tool times out.properties are correct. or user locked out . Note: Since these parameters have default values. - - • Proxy settings — If you connect through a proxy. For example: <sf:retrieve username="${sf. Security token — The security token is a 25-digit string appended to your password. the sf. Because these calls are asynchronous. you may be temporarily locked out.Common Migration Issues Connection Problems Connection Problems The most common connection problems are detailed below: • Request timed out — When you retrieve or deploy metadata. Connection mismatch between sandbox and production — If all of your connection credentials in build.com Migration Tool will give the server process a total of 200 seconds (20 poll attempts.This error indicates a problem with the credentials in build. you may have a URL mismatch.com. Either contact your administrator to have the lock removed.serverurl}" retrieveTarget="retrieveUnpackaged" . include them in the target definition.xml" pollWaitMillis="10000" maxPoll="100"/> • Invalid username. then your sandbox username is foo@salesforce.

a class or an extension. every unit test in your organization namespace is executed. but the bulk cases as well. expected result. you should make sure that every use case of your application is covered. While only 75% of your Apex code must be covered by tests. Restricted user Test whether a user with restricted access to the sObjects used in your code gets the expected behavior (whether can run the code or received error messages. such as not being able to add a future date. every unit test in your organization namespace is executed.debug are not counted as part of Apex code coverage in unit tests. You must test not only the single record case. Instead. This should lead to 75% or more of your code being covered by unit tests. 25 . that is. Calls to System. Negative behavior There are likely limits to your applications. may be invoked for 1 to 200 records. including positive and negative cases. Note the following: When deploying to a production organization. your focus shouldn't be on the percentage of code that is covered. see “Understanding Testing in Apex” in the Force. not being able to specify a negative amount. that the user filled out everything correctly and did not go past the limits.com Apex Code Developer's Guide. You must test for the negative case and verify that the error messages are correctly produced as well as for the positive. All classes and triggers compile successfully.Common Migration Issues Testing in Apex Testing in Apex When deploying to a production organization. Positive behavior Test to verify that the expected behavior occurs through every expected permutation. Before you deploy Apex. salesforce. as well as bulk and single record. • • Every trigger has some test coverage.com recommends that you write tests for the following: Single action Test to verify that a single record produces the correct.) Note: Conditional and ternary operators are not considered executed unless both the positive and negative branches are executed. For more information. Bulk actions Every Apex script. and all of those tests complete successfully. and so on. whether a trigger. the following must be true: • 75% of your Apex code must be covered by unit tests. within the limits cases.

Glossary A |B |C |D |E |F |G |H |I |J |K |L |M |N |O |P |Q |R |S |T |U |V |W |X |Y |Z A Apex Force. Apex-managed sharing is only available for custom objects. and Visualforce pages that address a specific business need. Apex scripts can be initiated by Web service requests and from triggers on objects. and custom objects. Asynchronous Calls A call that does not return results immediately because the operation may take a long time. reports. library. you can make the app available to other Salesforce. custom tabs. and Visualforce pages.com Apex code is a strongly-typed. or application provides in order to allow other computer programs to request services from it and exchange data between them. 26 . related record updates. Calls in the Metadata API and Bulk API are asynchronous.com platform server in conjunction with calls to the Force. Apex code enables developers to add business logic to most system events. AppExchange AppExchange is a sharing interface from salesforce. Application Programming Interface (API) The interface that a computer system. In addition. you can package an app and upload it to AppExchange along with related components such as custom fields. dashboards. Salesforce. App Short for “application. Using syntax that looks like Java and acts like database stored procedures.” A collection of components such as tabs.com provides standard apps such as Sales and Call Center. object-oriented programming language that allows developers to execute flow and transaction control statements on the Force.com platform.com API. You can customize the standard apps to match the way you work.com users from AppExchange.com that allows you to browse and share apps and services for the Force. Then. AppExchange Upgrades Upgrading an app is the process of installing a newer version. Apex-Managed Sharing Enables developers to programmatically manipulate sharing to support their application’s behavior. including button clicks.

Metadata A component is an instance of a metadata type in the Metadata API.com IDE or the Force. Visualforce includes a number of standard components. 27 . Controller. <apex:detail>. Bulk API The REST-based Bulk API is optimized for processing large sets of data. Component Reference. upsert. such as the Force. You can access the component library from the development footer of any Visualforce page or the Visualforce Developer's Guide. Likewise.com API or Bulk API. variables. Visualforce A description of the standard and custom Visualforce components that are available in your organization.Glossary B Boolean Operators You can use Boolean operators in report filters to specify the logical relationship between two values. A component is described in an XML file and it can be deployed or retrieved using the Metadata API. Apex A template or blueprint from which Apex objects are created. It allows you to insert. or delete a large number of records asynchronously by submitting a number of batches which are processed in the background by Salesforce. C Class. It typically runs on a desktop or mobile device. Controlling Field Any standard or custom picklist or checkbox field whose values control the available values in one or more corresponding dependent fields. These apps treat the platform as a data source. Component. For example. for example. or they can use custom controllers. Visualforce pages can use the standard controllers that come by default with every standard or custom object. update. or tools built on top of it. Visualforce An Apex class that provides a Visualforce page with the data and business logic it needs to run. Client App An app that runs outside the Salesforce.com for your organization’s needs. the AND operator between two values yields search results that include both values. Custom Field A field that can be added in addition to the standard fields to customize Salesforce. or you can create your own custom components. user-defined methods. Component. Classes consist of other classes. and the MyCustomObject__c component is an instance of a custom object. In most cases. Apex classes are modeled on their counterparts in Java. Visualforce Something that can be added to a Visualforce page with a set of tags. the OR operator between two values yields search results that include either value. and static initialization code.com. For example. See also Web Services API. CustomObject is a metadata type for custom objects. See also Composite App and Native App.com Migration Tool. using the development model of whatever tool and platform for which they are designed. Custom App See App. exception types.com user interface and uses only the Force.

about the person. Custom Links Custom URLs defined by administrators to integrate your Salesforce. including sample code. the number rounds to 4. For example. thing. Dependent Field Any custom picklist or multi-select picklist field that displays available values based on the value selected in its corresponding controlling field. as well as new organizations.com.Glossary Custom Help Custom text administrators create to provide users with on-screen information specific to a standard field. for example. See also Object. Formerly known as Web links. and percent custom fields that indicates the total number of digits you can enter to the right of a decimal point. Custom Web content for use in custom links. and develop with the Force.99. toolkits. an online developer community. Developer Edition A free. presented with rows and columns.com provides a full range of resources for platform developers. D Database An organized collection of information. if you enter 4.com platform includes a database where your data is stored. 4.com platform. contacts. Decimal Places Parameter for number. Note that the system rounds the decimal numbers you enter. integrate. Database Table A list of information.com platform database. opportunities.com data with external websites and back-office systems.force.force. and the ability to obtain limited Force. for example a Java applet. Custom s-controls can contain any type of content that you can display in a browser. or concept you want to track. or deletes records from the Force. and can still be edited. Custom Object Custom records that allow you to store information unique to your organization. Existing s-controls will remain unaffected. won't be allowed to create them.986 in a field with Decimal Places of 2.com platform environments. The underlying architecture of the Force.com organization designed for developers to extend. or other records. After March 2010 organizations that have never created s-controls. or custom object. or a custom HTML Web form. 28 .98 for an entry of 2. Developer Edition accounts are available on developer. an Active-X control. updates. an Excel file. Document Library A place to store documents without attaching them to accounts. custom field. Data Manipulation Language (DML) An Apex method or operation that inserts. currency. fully-functional Salesforce. Developer Force The Developer Force website at developer. if necessary. Custom S-Control Note: S-controls have been superseded by Visualforce pages.

Entity Relationship Diagram (ERD) A data modeling tool that helps you organize your data into entities (or objects. either Salesforce. Email templates can be personalized with merge fields. Field-Level Security Settings that determine whether fields are hidden.Glossary E Email Alert Email alerts are workflow and approval actions that are generated using an email template by a workflow rule or approval process and sent to designated recipients. F Field A part of an object that holds a specific piece of information.com platform) and define the relationships between them. ERD diagrams for key Salesforce. as they are called in the Force. and database to allow you to customize and deploy applications in the cloud for your entire enterprise.com users or others. 29 .com components between a local file system and a Salesforce. more complex businesses. Available in Enterprise. Enterprise Edition A Salesforce. Filter Condition/Criteria Condition on particular fields that qualifies items to be included in a list view or report.com organization because it is bound to all of the unique objects and fields that exist in that organization's data model.” Force. Email Template A form email that communicates a standard message. or for partners who are using tools like Tibco or webMethods to build integrations that require strong typecasting. visible. such as a welcome letter to new employees or an acknowledgement that a customer service request has been received. operating system.com The salesforce.com platform for building applications in the cloud. or custom format. author. Force. The downside of the Enterprise WSDL is that it only works with the schema of a single Salesforce. Enterprise WSDL A strongly-typed WSDL for customers who want to build an integration with their Salesforce. Enumeration Field An enumeration is the WSDL equivalent of a picklist field. or editable for users based on their profiles. Force. all having the same data type. debug and deploy Force. HTML. read only.com organization. The valid values of the field are restricted to a strict set of possible values.com Migration Tool A toolkit that allows you to write an Apache Ant build script for migrating Force. Unlimited. such as a text or currency value.com applications in the Eclipse development environment. Force.com edition designed for larger.com IDE An Eclipse plug-in that allows developers to manage. such as “State equals California.com combines a powerful user interface.com organization only. and Developer Editions only.com objects are published in the Web Services API Developer's Guide. and can be written in text.

com platform runs on multiple instances. and can still be edited. which represents each country by two letters. Function Built-in formulas that you can customize with input parameters. but data for any single organization is always consolidated on a single instance. and day. as well as new organizations. won't be allowed to create them.Glossary Foreign key A field whose value is the same as the primary key of another table. Inline S-Control Note: S-controls have been superseded by Visualforce pages. The Force. ISO Code The International Organization for Standardization country code. rather than on its own page. You can think of a foreign key as a copy of a primary key from another table. G Gregorian Year A calendar based on a twelve month structure used throughout much of the world. After March 2010 organizations that have never created s-controls. month. An s-control that displays within a record detail page or dashboard. A relationship is made between two tables by matching the values of the foreign key in one table with the values of the primary key in another. Instance The cluster of software and hardware represented as a single logical server that hosts an organization's data and runs their applications.com user defined solely for client apps or integrations. Integration User A Salesforce. Also referred to as the logged-in user in a Web services API context. For example. Existing s-controls will remain unaffected. I ID See Salesforce. Group Edition A product designed for small businesses and workgroups with a limited number of users.com Record ID. or other values. They behave as proxy servers running on your local machine and allow you to inspect and author individual requests. the DATE function creates a date field type from a given year. 30 . Formula fields automatically calculate their values based on the values of merge fields. H HTTP Debugger An application that can be used to identify and inspect SOAP requests that are sent from the AJAX Toolkit. Formula Field A type of custom field. expressions.

For more information. you may have a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. the organization-level locale field is called Locale. or Developer Edition organization as your license management organization. Using a custom junction object.com. List View A list display of items (for example.zip file containing a project manifest (package.com users who install your package. cases have a lookup relationship with assets that allows users to select an asset using a lookup dialog from the case edit page and click the name of the asset from the case detail page. Locale The country or geographic region in which the user is located. Salesforce. For example. License Management Organization (LMO) The Salesforce. for example. dates in the English (United States) locale display as 06/30/2000 and as 30/06/2000 in the English (United Kingdom) locale. Unlimited. A license management organization must have the License Management Application (LMA) installed. You can display lookup fields on page layouts where the object has a lookup or master-detail relationship with another object.com/docs/en/lma/index. accounts or contacts) based on specific criteria. In Professional. K No Glossary items for this entry. Unlimited.salesforce. The list views you can select to display in the console are the same list views defined on the tabs of other objects. Enterprise. You can specify any Enterprise. the username used to log into Salesforce.htm. Client applications run with the permissions and sharing of the logged-in user. Also referred to as an integration user. you can model a “many-to-many” relationship between two objects. Lookup Field A type of field that contains a linkable value to another record. In Personal and Group Editions.xml file) and one or more metadata components. It automatically receives notification every time your package is installed or uninstalled so that you can easily notify users of upgrades.Glossary J Junction Object A custom object with two master-detail relationships. You cannot create a list view within the console. 31 . In the Console tab. The setting affects the format of date and number fields. the list view is the top frame that displays a list view of records based on specific criteria. Logged-in User In a Web services API context. a user’s individual Locale setting overrides the organization’s Default Locale setting.com organization that you use to track all the Salesforce. L License Management Application (LMA) A free AppExchange app that allows you to track sales leads and accounts for every user who downloads a managed package of yours from AppExchange. Local Project A . not Default Locale. go to http://www. and Developer Edition organizations.com provides some predefined views. For example.

or clients built on top of the Metadata API.to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers onAppExchange. managed packages obfuscate certain components (like Apex) on subscribing organizations. similar to a domain name. Many-to-Many Relationship A relationship where each side of the relationship can have many children on the other side.com organization. security. For example.Glossary M Managed Package A collection of application components that are posted as a unit on AppExchange.com Metadata API calls. and are associated with a namespace and possibly a License Management Organization. such as the Force. Multitenancy An application model where all users and apps share a single. Salesforce.com. common infrastructure and code base. Manifest File The project manifest file (package. Metadata Information about the structure.xml) lists the XML components to retrieve or deploy when working with the Metadata API. In addition. Force. This type of relationship affects record deletion. They differ from unmanaged packages in that some components are locked.com uses XML to describe metadata. and functionality of an organization and any of its parts. to all unique component names in your Salesforce. Manual Sharing Record-level access rules that allow record owners to give read and edit permissions to other users who might not have access to the record any other way. N Namespace In a packaging context. Native apps do not require any external services or infrastructure.com Migration Tool. so as to protect the intellectual property of the developer. appearance. accounts have a master-detail relationship with opportunities. Native App An app that is built exclusively with setup (metadata) configuration on Force. Unmanaged packages do not include locked components and cannot be upgraded. allowing the managed package to be upgraded later. and makes the lookup relationship field required on the page layout.com IDE or the Force. A package must be managed for it to support upgrades. Master-Detail Relationship A relationship between two different types of records that associates the records with each other.com automatically prepends your namespace prefix. An organization can create a single managed package that can be downloaded and installed by many different organizations. a one. Many-to-many relationships are implemented through the use of junction objects. 32 . Metadata WSDL A WSDL for users who want to use the Force. followed by two underscores (“__”).

com setup menu. you can get a global view of all parent/subsidiary relationships using the View Hierarchy link. Object-Level Security Settings that allow an administrator to hide whole tabs and objects from a user so that he or she does not know that type of data exists. an account may have one or more related contacts. On the platform you set object-level access rules with object permissions on user profiles. and edit pages. your organization will have multiple records that store the information about specific instances of that type of data. detail. Outbound Message An outbound message is a workflow. For example. The object is the overall definition of the type of information you are storing.com components and applications that are made available to other organizations through the AppExchange. onClick JavaScript JavaScript code that executes when a button or link is clicked. Outbound messaging is configured in the Salesforce. as well as list views and related lists. Organization-Wide Defaults Settings that allow you to specify the baseline level of data access that a user has in your organization. you might have a case record to store the information about Joe Smith's training inquiry and another case record to store the information about Mary Johnson's configuration issue. By specifying a parent for an account. click outside of the overlay.Glossary O Object An object allows you to store information in your Salesforce. It displays on custom object record home (overview). One-to-Many Relationship A relationship in which a single object is related to many other objects. approval. Depending on the overlay. P Package A group of Force. such as an external service.com organization. the case object allow you to store information regarding customer inquiries. Overlay An overlay displays additional information when you hover your mouse over certain user interface elements. You can create a listener for the messages using the Web services API. For example. you can make it so that any user can see any record of a particular object that is enabled in their user profile. 33 . it will close when you move your mouse away. but that they need extra permissions to edit one. You use packages to bundle an app along with any related components so that you can upload them to AppExchange together. For example. or click a close button. Then you must configure the external endpoint. Object-Level Help Custom help text that you can provide for any custom object. For example. An outbound message sends the data in the specified fields in the form of a SOAP message to the endpoint. a contact or case) is assigned. Parent Account Organization or company that an account is affiliated with or owned by. For each object. or milestone action that sends the information you specify to an endpoint you designate. Owner Individual user to which a record (for example.

Production Organization A Salesforce. The relationship is made between two tables by matching the values of the foreign key in one table with the values of the primary key in another.com object.com CRM apps. Picklist Selection list of options available for specific fields in a Salesforce.com object. for example. With this WSDL.salesforce. This field is called the primary key. partners. Professional Edition A Salesforce. Salesforce. Picklist Values Selections displayed in drop-down lists for particular fields.Glossary Partner WSDL A loosely-typed WSDL for customers. the Industry field for accounts. Platform Edition A Salesforce.com organization that has live users accessing data.com uses queues in a number of different features and technologies. Some values come predefined.com edition designed for businesses who need full-featured CRM functionality. Multi-select picklists allow users to choose one or more values. Query String Parameter A name-value pair that's included in a URL. and other values can be changed or defined by an administrator.com/001/e?name=value 34 . Users can choose a single value from a list of options rather than make an entry directly in the field. typically after a '?' character. Q Queue A holding area for items before they are processed. Each table in a relational database has a field in which the data value uniquely identifies the record. For example: http://na1. Users can choose a value by double clicking on it. Picklist (Multi-Select) Selection list of options available for specific fields in a Salesforce.com organizations. Personal Edition Product designed for individual sales representatives and single users. However. Primary Key A relational database concept.com organization. the developer is also freed from being dependent on any particular data model or Salesforce. Contrast this with the Enterprise WSDL. or choose additional values from a scrolling list by holding down the CTRL key while clicking a value and using the arrow icon to move them to the selected box. See also Master Picklist. and ISVs who want to build an integration or an AppExchange app that can work across multiple Salesforce. the developer is responsible for marshaling data in the correct object representation. which typically involves editing the XML. which is strongly typed.com edition based on either Enterprise Edition or Unlimited Edition that does not include any of the standard Salesforce. such as Sales or Service & Support.

Matching values in a specified field in both objects are used to link related data.com object.com provides a set of pre-defined standard report types. a relationship allows you to find out which people work at the company. Whenever a record name is displayed in a Force. For example. Relationship A connection between two objects. If the running user is a specific user. Record Name does not have to be a unique value. For example. the value is represented as a link to a detail view of the record. A record name can be either free-form text or an autonumber field.com application. Reports display only records that meet the criteria defined in the report type. or asset in the mini view. Salesforce. Record-Level Security A method of controlling data in which you can allow a particular user to view and edit an object. Relationship Query In a SOQL context. an administrator can choose to display an associated account. Running User Each dashboard has a running user. Role Hierarchy A record-level security setting that defines different levels of users such that users at higher levels can view and edit information owned by or shared with users beneath them in the role hierarchy. administrators can create custom report types as well. Record types are special fields that you can associate with profiles to make only the included picklist values available to users with that profile. but then restrict the records that the user is allowed to see. regardless of the organization-wide sharing model settings. whose security settings determine which data to display in a dashboard. “John Jones” might be the name of a contact record. used to create related lists in page layouts and detail levels in reports. Recycle Bin A page that lets you view and restore deleted information. Record Type A field available for certain records that can include some or all of the standard and custom picklist values for that record. Related Object Objects chosen by an administrator to display in the Console tab's mini view when records of a particular type are shown in the console's detail view. if one object stores data about companies and another object stores data about people. Access the Recycle Bin by using the link in the sidebar. a query that traverses the relationships between objects to identify and return results. Parent-to-child and child-to-parent syntax differs in SOQL queries.Glossary R Record A single instance of a Salesforce. Roll-Up Summary Field A field type that automatically provides aggregate values from child records in a master-detail relationship. contact. when a case is in the detail view. Record Name A standard field on all Salesforce. for example. all dashboard viewers see data based on the security settings of that user—regardless of their own 35 . Report Type A report type defines the set of records and fields available to a report based on the relationships between a primary object and its related objects.com objects.

com ID.com. as well as new organizations. Search Phrase Search phrases are queries that users enter when searching on www. in lookup dialogs.com that allows you to make calls to external Web services from within Apex. which are terms for the unique ID of a Salesforce. Salesforce. so that each user sees the dashboard according to his or her own access level. The inactivity timer is reset to zero if a user takes an action in the Web interface or makes an API call. and can still be edited. and in the key lists on tab home pages. The Session ID prevents a user from having to log in again every time he or she wants to perform another action in Salesforce. won't be allowed to create them. Sandbox Organization A nearly identical copy of a Salesforce. you can set the running user to be the logged-in user. Search Layout The organization of fields included in search results. For dynamic dashboards. such as testing and training.Glossary personal security settings. After March 2010 organizations that have never created s-controls.com SOA (Service-Oriented Architecture) A powerful capability of Force. Custom s-controls can contain any type of content that you can display in a browser. S-Control Note: S-controls have been superseded by Visualforce pages. S SaaS See Software as a Service (SaaS). You can create multiple sandboxes in separate environments for a variety of purposes. Access Setup through the Your Name ➤ Setup link at the top of Salesforce. or a custom HTML Web form.com by clicking Your Name ➤ Setup ➤ Security Controls. Custom Web content for use in custom links. The default is 120 minutes (two hours). Role Hierarchy—defines different levels of users such that users at higher levels can view and edit information owned by or shared with users beneath them in the role hierarchy. 36 . an Excel file. Sharing Allowing other users to view or edit information you own. Session ID An authentication token that is returned when a user successfully logs in to Salesforce.com pages. regardless of the organization-wide sharing model settings. There are different ways to share data: • • Sharing Model—defines the default organization-wide access levels that users have to each other’s information and whether to use the hierarchies when determining access to data.google.com. Session Timeout The period of time after login before a user is automatically logged out. for example a Java applet.com applications. which can be configured in Salesforce. Setup An administration area where you can customize and define Force.com. Sessions expire automatically after a predetermined length of inactivity. Existing s-controls will remain unaffected.com record.com production organization. an Active-X control. without compromising the data and applications in your production environment. Different from a record ID or Salesforce.

com platform. and support of the application and each customer's data.Glossary • • • Sharing Rules—allow an administrator to specify that all information created by users within a given group or role is automatically shared to the members of another group or role. Apex-Managed Sharing—enables developers to programmatically manipulate sharing to support their application’s behavior. Sites Force. Manual Sharing—allows individual users to share a specific account or opportunity with other users or groups. the console also displays debugging information. The body of the System Log displays system resource information.com organization—without requiring users to log in with a username and password.com API. Services can be delivered using the SaaS model to any market segment.com database.com sites enables you to create public websites and applications that are directly integrated with your Salesforce. such as how long a line took to execute or how many database calls were made. If the code did not run to completion. After March 2010 organizations that have never created s-controls. Enter the code you want to test at the bottom of the window and click Execute. You can also build custom objects to store information that is unique to your app. Sharing Rule Type of default sharing created by administrators. System Log A separate window console that can be used for debugging code snippets. 37 . A type of s-control that is designed to be included in other s-controls. software.com Object Search Language) A query language that allows you to perform text-based searches using the Force. SOQL (Salesforce. configure. The service alleviates the need for customers to install. Snippet Note: S-controls have been superseded by Visualforce pages. Allows users in a specified group or role to have access to all information created by users within a given group or role. Existing s-controls will remain unaffected. and related IT resources. and can still be edited. and maintain applications with their own hardware. Similar to a helper method that is used by other methods in a piece of code. Standard Object A built-in object included with the Force. SOAP (Simple Object Access Protocol) A protocol that defines a uniform way of passing XML-encoded data. Software as a Service (SaaS) A delivery model where a software application is hosted as a service and provided to customers via the Internet. operation. as well as new organizations. See Apex-Managed Sharing. a snippet allows you to maintain a single copy of HTML or JavaScript that you can reuse in multiple s-controls. The SaaS vendor takes responsibility for the daily maintenance. SOSL (Salesforce. won't be allowed to create them.com Object Query Language) A query language that allows you to construct simple but powerful query strings and to specify the criteria that should be used to select data from the Force. Sharing Model Behavior defined by your administrator that determines default access by users to different types of records.

38 .com's flagship solution for maximizing CRM success and extending that success across the entire enterprise through the Force. Unmanaged Package A package that cannot be upgraded or controlled by its developer. the HTML is hosted and run by an external website. See also Test Method. Every trigger runs with a set of context variables that provide access to the records that caused the trigger to fire. won't be allowed to create them. as well as new organizations. updated.com organization. or deleted from the database. document. Translation Workbench The Translation Workbench lets you specify languages you want to translate. An s-control that contains an external URL that hosts the HTML that should be rendered on a page. Trigger A piece of Apex that executes before or after records of a particular type are inserted. assign translators to languages.com platform. URL s-controls are also called Web controls.com.com in their language. or other resource on the Internet. Everything from custom picklist values to custom fields can be translated so your global users can use all of Salesforce.com IDE. V Validation Rule A rule that prevents a record from being saved if it does not meet the standards that are specified. A unit test operates on that piece of code to make sure it works correctly. usually a method. such as the Force. URL (Uniform Resource Locator) The global address of a website. rather than just one record at a time.Glossary T Test Method An Apex class method that verifies whether a particular piece of code is working properly. http://www. they process several records at once. create translations for customizations you’ve made to your Salesforce. and can still be edited.salesforce. commit no data to the database. Trigger Context Variable Default variables that provide access to information about the trigger and the records that caused it to fire. After March 2010 organizations that have never created s-controls. Test methods take no arguments. Existing s-controls will remain unaffected. and all triggers run in bulk mode—that is. URL S-Control Note: S-controls have been superseded by Visualforce pages. Unlimited Edition Unlimited Edition is salesforce. and can be executed by the runTests() system method either through the command line or in an Apex IDE. For example. When saved this way. U Unit Test A unit is the smallest testable part of an application. and override labels and translations from managed packages.

outbound message. even if they run on different platforms. Web Tab A custom tab that allows your users to use external websites from within the application. Outbound messages are used primarily with composite apps. WebService Method An Apex class method or variable that can be used by external systems. field updates.com organization's information. The components can either be controlled by the same logic that is used in standard Salesforce. or are geographically remote from each other. or developers can associate their own logic with a controller written in Apex. or task that fires when the conditions of a workflow rule are met. as long as they have a valid email address. field update. Workflow Email Alert A workflow action that sends an email when a workflow rule is triggered. Web Service A mechanism by which two applications can easily exchange data over the Internet. Unlike workflow tasks. See also Bulk API. Workflow and Approval Actions Workflow and approval actions consist of email alerts. Workflow Field Update A workflow action that changes the value of a particular field on a record when a workflow rule is triggered. tag-based markup language that allows developers to easily define custom pages and components for apps built on the platform.com pages. tasks. Each tag corresponds to a coarse or fine-grained component. such as another cloud computing application. which can only be assigned to application users.Glossary Visualforce A simple. 39 . Web Links See Custom Links. such as a section of a page. are written in different languages. and outbound messages that can be triggered by a workflow rule or approval process. a related list. Workflow Action An email alert. workflow alerts can be sent to any user or contact. Web Services API A SOAP-based Web services application programming interface that provides access to your Salesforce. Workflow Outbound Message A workflow action that sends data to an external Web service. or a field. Web service methods must be defined in a global class. Workflow Queue A list of workflow actions that are scheduled to fire based on workflow rules that have one or more time-dependent workflow actions. like a mash-up with a third-party application. W Web Control See URL S-Control.

com components that are retrieved or deployed through the Metadata API are represented by XML definitions. You can configure workflow actions to execute immediately when a record meets the conditions in your workflow rule. A collection of files retrieved or deployed by the Metadata API. Your development environment's SOAP client uses the Salesforce. X XML (Extensible Markup Language) A markup language that enables the sharing and transportation of structured data.Glossary Workflow Rule A workflow rule sets workflow actions into motion when its designated conditions are met. or set time triggers that execute the workflow actions on a specific day. See also Local Project. All Force. Z Zip File A data compression and archive format. 40 . Y No Glossary items for this entry.com Enterprise WSDL or Partner WSDL to communicate with Salesforce.com using the Web services API. Workflow Task A workflow action that assigns a task to an application user when a workflow rule is triggered. WSDL (Web Services Description Language) File An XML file that describes the format of messages you send and receive from a Web service.

Index Index A ant-salesforce. 23 editing 18 retrieving 18 metadata component types 9 D DaaS 3 deleting components 18 deploy call running tests 21 deploy targets 15 deploying changes 19 deploying code 19 deploying metadata 23 describeMetadata 13 destructiveChanges.serverurl 8 sf.html file 6 RecordType component 9 retrieve targets 15 retrieving metadata 18 S Scontrol component 9 security token 23 sf. deploying 19 common deployment problems 23 connection problems 23 CustomApplication component 9 CustomField component 9 CustomObject component 9 CustomPageWebLink component 9 CustomTab component 9 L Layout component 9 Letterhead component 9 listMetadata 13.properties file 8 build.username 8 StaticResource component 9 41 .xml constructing 13.com Migration Tool 3 checking status 22 connecting 8 deploying 19 downloading 6 editing metadata 18 prerequisites 5 retrieving metadata 18 using 8 R Readme.com Migration Tool 5 Profile component 9 project manifest 9 proxy settings 23 E editing metadata 18 EmailTemplate component 9 F Folder component 9 Force.xml 15 I installation overview 5 C checking status 22 code coverage 23 code.xml file 18 Document component 9 N named packages 3 P package.xml file 9. 18 Picklist component 9 pollWaitMillis parameter 23 prerequisites for Force. 14 package.password 8 sf. 14 M managed packages 3 manifest file 9 maxPoll parameter 23 metadata deploying 8.jar file 6 ApexClass component 9 ApexComponent component 9 ApexPage component 9 ApexTrigger component 9 H helper targets 13 describeMetadata 13 listMetadata 14 HomePageComponent component 9 HomePageLayout component 9 B build.

xml 9 Workflow component 9 42 .T targets for deploy and retrieve 15 V ValidationRule component 9 Visualforce page component 9 Index U unpackaged package 3 W WebLink component 9 wildcard symbol in package.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.