Deploy Sandboxes
Deploy Sandboxes
© Copyright 2000–2013 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
Index.................................................................................................................................................36
i
DEPLOY ENHANCEMENTS FROM
SANDBOXES
• Isolate customization and development work from your production environment until you’re ready to deploy changes.
• Test changes against copies of your production data and users.
• Provide a training environment.
• Coordinate individual changes into one deployment to production.
Whether you’re an administrator adding features to an organization, a solo developer writing code, or a team of developers
working to enhance your organization, you should work with the right tools in the right environment to build and deploy
change successfully to your production organization. For a broad overview of the development process and recommendations
for organizing your work, see the Development Lifecycle Guide.
See Also:
Sandbox Overview
Deployment Overview
Choose Your Tools for Developing and Deploying Changes
Salesforce gives you the ability to create multiple copies of your organization in separate environments for a variety of purposes,
such as testing and training, without compromising the data and applications in your Salesforce production organization.
1
Deploy Enhancements from Sandboxes Sandbox Overview
These copies are called sandboxes and are nearly identical to your Salesforce production organization. For a list of differences,
see Sandbox Setup Tips and Considerations on page 9.
Sandboxes are completely isolated from your Salesforce production organization, so operations you perform in your sandboxes
do not affect your Salesforce production organization, and vice versa.
From Setup, click Sandboxes or Data Management > Sandboxes to view and manage your existing sandboxes or create new
ones. For instructions, see Managing Sandboxes on page 7.
The sandbox types are:
Developer Sandbox
Developer sandboxes are special configuration sandboxes intended for coding and testing by a single developer. Multiple
users can log into a single Developer sandbox, but their primary purpose is to provide an environment in which changes
under active development can be isolated until they’re ready to be shared. Just like Developer Pro sandboxes, Developer
sandboxes copy all application and configuration information to the sandbox. Developer sandboxes are limited to 200
MB of test or sample data, which is enough for many development and testing tasks. You can refresh a Developer sandbox
once per day.
Full Sandbox
Full sandboxes copy your entire production organization and all its data, including standard and custom object records,
documents, and attachments. You can refresh a Full sandbox every 29 days.
Sandbox templates allow you to pick specific objects and data to copy to your sandbox, so you can control the size and content
of each sandbox. Sandbox templates are only available for Partial Data or Full sandboxes.
Sandbox Availability
You purchase licenses for each sandbox type, and can purchase multiple licenses of each type. Sandbox licenses are hierarchical.
Specifically, the following table shows the type of sandbox you can create with each license:
2
Deploy Enhancements from Sandboxes Creating or Refreshing a Sandbox
In use
The active, or ready to be activated, sandboxes you created with your license.
Note: If you don’t see a sandbox option or need licenses for more sandboxes, contact salesforce.com to order sandboxes
for your organization.
Replacement Ready
When you refresh an existing sandbox, you also need to activate it. The “Replacement Ready” status indicates Salesforce
has a copy of your object data and is ready for you to activate the sandbox so you can use it.
See Also:
Creating or Refreshing a Sandbox
Sandbox Restrictions and Licenses
Development Lifecycle Guide
3
Deploy Enhancements from Sandboxes Creating or Refreshing a Sandbox
Note: Partial Data sandboxes require a sandbox template to select the data from your organization. For
more information, see Creating Sandbox Templates on page 6.
4
Deploy Enhancements from Sandboxes Creating or Refreshing a Sandbox
Full Sandbox
Full sandboxes copy your entire production organization and all its data, including standard and custom object records,
documents, and attachments. You can refresh a Full sandbox every 29 days.
Note: If you don’t see a sandbox option or need licenses for more sandboxes, contact salesforce.com to order
sandboxes for your organization.
If you have reduced the number of sandboxes you purchased, but you still have more sandboxes of a specific type than
allowed, you will be required to match your sandboxes to the number of sandboxes that you purchased. For example, if
you have two Full sandboxes but purchased only one, you cannot refresh your Full sandbox as a Full sandbox. Instead, you
must choose one Full sandbox to convert to a smaller sandbox, such as a Developer Pro or a Developer sandbox, depending
on which types you have available.
5. Select the data you want to include in your sandbox (you have this option for a Partial Data or Full sandbox).
For a Partial Data sandbox, select the template you created to specify the data for your sandbox. If you have not created a
template for this Partial Data sandbox, see Creating Sandbox Templates on page 6.
For a Full sandbox, choose how much object history, case history, and opportunity history to copy, and whether or not to
copy Chatter data. Object history is the field history tracking of custom and most standard objects; case history and
opportunity history serve the same purpose for cases and opportunities. You can copy from 0 to 180 days of history, in
30–day increments. The default value is 0 days. Chatter data includes feeds, messages, and discovery topics. Decreasing
the amount of data you copy can significantly speed up sandbox copy time.
You can choose to include Template-based data for a Full sandbox. For this option, you need to have already created a
sandbox template. Then you can pick the template from a list of templates you’ve created. For more information, see
Creating Sandbox Templates on page 6.
6. Click Create.
The process may take several minutes, hours, or even days, depending on the size and type of your organization.
Tip: Try to limit changes in your production organization while the sandbox copy proceeds.
5
Deploy Enhancements from Sandboxes Creating Sandbox Templates
Warning: Activating a replacement sandbox that was created using the Refresh link completely deletes the
sandbox it is refreshing. All configuration and data in the prior sandbox copy will be lost, including any application
or data changes you have made. Please read the warning carefully, and press the Activate link only if you have no
further need for the contents of the sandbox copy currently in use. Your production organization and its data will
not be affected.
3. Read the warning carefully and if you agree to the removal, enter the acknowledgment text at the prompt and click the
Activate button.
• You will receive a notification email when your newly created or refreshed sandbox has completed copying. If you are
creating a new sandbox, the newly created sandbox is now ready for use.
• You can click the link in the notification email to access your sandbox.
• Users can log into the sandbox at https://test.salesforce.com by appending .sandbox_name to their Salesforce
usernames. For example, if a username for a production organization is [email protected], and the sandbox is named
“test”, then the modified username to log into the sandbox is [email protected].
See Also:
Sandbox Overview
Creating Sandbox Templates
Managing Sandboxes
Sandbox Setup Tips and Considerations
Sandbox Restrictions and Licenses
6
Deploy Enhancements from Sandboxes Managing Sandboxes
Sandbox data templates allow you to pick specific objects and data to copy to your Full or Partial Data sandbox so you can
control the size and content of each sandbox. Sandbox data templates are only available for use with Full or Partial Data
sandboxes.
When you create a sandbox data template, you select the object data (standard and custom) to copy. All of the records for the
selected objects are copied to the new sandbox.
Some objects are included even before you’ve selected anything because they’re required in any organization. The template
starts with all of the required objects and metadata for a Developer Pro sandbox, and then adds the object data you selected
in the template. Other objects are added automatically when you select objects that are dependent on them. As you configure
the template, the Copy Statistics panel shows you an estimate of how much data would be copied to a sandbox based on this
template.
As you change the schema of the objects in your organization, Salesforce updates the template by adding or subtracting the
related, included objects. For example, if Object A is a master of Object B, and you add Object B to a template, Salesforce
requires Object A in the template, and adds Object A.
1. From Setup, click Sandboxes > Sandbox Templates tab or Data Management > Sandboxes > Sandbox Templates tab.
2. Click New Sandbox Template or click Edit next to an existing template you want to modify.
3. Enter a name and description for the sandbox template.
4. To add objects to the template, select the checkbox for each object you want from the available Objects list.
The Object Details section shows you the objects to be added automatically with the one you’ve selected.
5. To remove objects from the template, deselect the checkbox for the object in the available Objects list.
If you remove an object you previously selected, dependent objects you didn’t explicitly select are removed. If you attempt
to remove an object with dependent objects, you’ll receive a warning requesting a confirmation of the removal. Once you
confirm your choice, those objects will also be removed.
6. Click Save.
See Also:
Creating or Refreshing a Sandbox
Sandbox Overview
Managing Sandboxes
Available in: Enterprise, Performance, Unlimited, and Database.com Editions
To manage your sandboxes, in Setup click Sandboxes. Salesforce displays the available sandboxes you've purchased, as well
as a list of your sandboxes in use.
Your sandbox information is organized by tabs.
Sandbox Tab
This tab lists any available sandboxes you have created.
• Click New Sandbox.
7
Deploy Enhancements from Sandboxes Managing Sandboxes
Salesforce deactivates the New Sandbox button when an organization reaches its sandbox limit. If necessary, contact
salesforce.com to order more sandboxes for your organization.
Also, Salesforce deactivates all refresh links if you have exceeded your sandbox limit. For detailed steps, see Creating or
Refreshing a Sandbox on page 3.
• Administrators can click Login to log into a sandbox as a user.
Salesforce only displays this option for active sandboxes, and you must be logged into your organization as an administrator
to see the Login button.
Users can log into the sandbox at https://test.salesforce.com by appending .sandbox_name to their Salesforce
usernames. For example, if a username for a production organization is [email protected], and the sandbox is named
“test”, then the modified username to log into the sandbox is [email protected].
• Click a sandbox name to see the sandbox detail page. On the sandbox detail page, you can:
◊ Click Refresh to replace an existing sandbox with a new copy. Salesforce only activates the Refresh button for sandboxes
that are eligible for refreshing. For full-copy sandboxes, this is any time after 29 days from the previous creation or
refresh of that sandbox. For Developer Pro sandboxes (including developer sandboxes), you can refresh once per day.
Your existing copy of this sandbox remains available while you wait for the refresh to complete. The refreshed copy is
inactive until you activate it.
◊ Click Activate to activate a refreshed sandbox. Salesforce only displays this option for sandboxes that are not activated.
You must activate your refreshed sandbox before you can access it.
Warning: Activating a refreshed sandbox replaces the existing sandbox with the refreshed version. This
permanently deletes the existing version and all data in it. Your production organization and its data will not
be affected.
See Also:
Creating or Refreshing a Sandbox
Sandbox Restrictions and Licenses
Development Lifecycle Guide
8
Deploy Enhancements from Sandboxes Sandbox Setup Tips and Considerations
When you log in with the modified username, you log into the corresponding sandbox.
• The copy process doesn’t copy Contact data to developer sandboxes. Therefore, Customer Portal users aren’t copied.
However, the copy process does copy the Customer Portal licenses, so you can create Customer Portal users in these
sandboxes as needed.
• User email addresses are modified in a sandbox so that production users, who may not know of the sandbox, don’t receive
automatically generated email messages from the sandbox, such as notifications from triggered workflow or escalation
rules. If you do want sandbox users to receive automatically generated emails as part of your testing, you can manually
correct the email addresses while logged into the sandbox.
9
Deploy Enhancements from Sandboxes Sandbox Setup Tips and Considerations
Warning: Sandboxes automatically change Salesforce user email addresses, but don’t change other email addresses
in Salesforce, such as those in contact records. To avoid sending unsolicited email from your sandboxes, manually
invalidate or delete all email addresses in your sandboxes that don’t belong to users of the sandbox. When testing
outbound email, change contact email addresses to those of testers or an automated test script.
Email Deliverability
Newly created sandboxes have the default email deliverability setting System email only. To configure email deliverability
settings, in the sandbox organization, from Setup, click Email Administration > Deliverability. If editable, set the Access
level in the Access to Send Email section. You may not be able to edit the Access level if salesforce.com has
restricted your organization’s ability to change this setting.
• No access>: Prevents all outbound email to and from users.
• System email only: Allows only automatically generated emails, such as new user and password reset emails.
• All email>: Allows all types of outbound email. Default for new, non-sandbox organizations.
Tip: The System email only setting is especially useful for controlling email sent from sandboxes so that testing
and development work doesn’t send test emails to your users.
• Newly created sandboxes default to System email only.
• Sandboxes created before ’Spring 13 default to All email.
10
Deploy Enhancements from Sandboxes Sandbox Setup Tips and Considerations
• The Object History, Case History, and Opportunity History options allow you to select the number of days of history
from your production organization to copy to your sandbox. You can copy from 0 to 180 days of history, in 30–day
increments. The default value is 0 days.
• By default, Chatter data won’t be copied to your sandbox. Chatter data includes feeds, messages, and discovery topics.
Select the Copy Chatter Data checkbox if you need to copy it.
• The setup audit trail history of your production organization won’t be copied to your sandbox. The audit trail for your
sandbox organization will start when you begin to use it.
• Archived activities (tasks and events that aren’t available in the production organization because they’re over a year old)
and password history (users’ previous passwords) won’t be copied to your sandbox.
Note: Don’t increase the default selections unless special circumstances require it. Too much data can cause significant
delays in the time it takes to copy your sandbox.
Accessing Sandboxes
• Access changes for sandbox users:
◊ A sandbox refresh deletes and recreates the sandbox as a new copy of the production organization. In effect, this reverses
any manual access changes you've performed. If you created sandbox-only users, they will no longer exist, and a user’s
profile and permissions revert to their values in the production organization. This means that after a refresh, any access
changes will need to be repeated in the new copy.
◊ You can create users in your production organization that are inactive, and then activate them in a sandbox. This is a
good way to create a user in a sandbox that has the appropriate permissions to develop in a sandbox.
◊ Many development and testing tasks require the “Modify All Data” permission. Because your developers might not
have that permission in the production organization, you may need to increase their permissions in a sandbox. Exercise
caution when granting this permission in sandbox organizations that contain sensitive information copied from production
(for example, social security numbers).
◊ Users added in a production organization instance after creating or refreshing a sandbox do not have access to the
production organization instance’s related sandboxes. To create new users in a sandbox, you must log in as the
administrator on the sandbox organization, and create them in the sandbox instance.
◊ You can create new users for sandbox development, but these count against the number of licensed users in your
organization. To reduce your license count, you can disable production users who won’t need access to the sandbox
before you create or refresh a sandbox.
• Always log in to your sandbox organization using the https://test.salesforce.com login URL.
• Remember to log in using the modified username as described in Users and Contacts on page 9.
• If using the API, after you log in you must use the redirect URL that is returned in the loginResult object for subsequent
access. This URL reflects the instance on which the sandbox is located and the appropriate server pool for API access.
• All sandbox copies are made with federated authentication with SAML disabled. Any configuration information is preserved,
except the value for Recipient URL. The Recipient URL is updated to match your sandbox URL, for example
http://cs1.salesforce.com, after you re-enable SAML. To enable SAML in the sandbox copy, from Setup, click
Security Controls > Single Sign-On Settings; then click Edit, and select SAML Enabled. You must change the value
of the Recipient URL in the certificate for your client application as well.
11
Deploy Enhancements from Sandboxes Sandbox Setup Tips and Considerations
The version of your sandboxes may differ from Force.com AppExchange around the time of a Salesforce release. Check
the logo in the upper left corner of your sandbox home page for version information.
• If your organization uses quote templates, and you create a Developer Pro sandbox, templates that contain Text/Image
fields cannot be opened for editing within the sandbox.
• If your production organization uses an image in quote templates and you copy the organization to your sandbox, the image
path will no longer be correct and the image will appear as a broken link. To display the image, reinsert it from the correct
location on your sandbox.
Service Exclusions
• The following features are disabled and cannot be enabled in sandboxes:
◊ Case escalation.
◊ Contract expiration warnings.
Case escalation, and contract expiration warnings are disabled because they automatically send email to contacts,
customers, and users who should not interact with sandboxes.
◊ Subscription summary.
◊ Data exports (in Setup at Data Management > Data Export > Export Now or Data Management > Data Export >
Schedule Export).
◊ The ability to create Salesforce sandboxes.
◊ Email service addresses that you create in your sandbox cannot be copied to your production organization.
◊ The ability to publish Site.com sites.
12
Deploy Enhancements from Sandboxes Sandbox Restrictions and Licenses
Note that the time of the latest execution of the background delete process is available through the getDeleted() API
call.
See Also:
Creating or Refreshing a Sandbox
Sandbox Overview
Sandbox Restrictions and Licenses
The following information includes restrictions and troubleshooting information for access to sandboxes.
Sandbox services are restricted if your organization doesn't comply with salesforce.com's licensing rules. This typically happens
when sandbox licenses expire.
As sandbox licenses expire, Salesforce.com decreases the count of available sandbox licenses for the selected sandbox type.
Note: Salesforce.com does not automatically delete sandbox organizations due to a license expiration. When the
licenses expire and your current license count is lower than the number of provisioned sandbox organizations,
Salesforce.com removes sandbox services, such as Refresh, Sandbox Org Accessibility, or Login.
There are a few different types of restrictions you might encounter when your organization doesn't comply with licensing
rules.
Unactivated Sandboxes
New sandboxes that aren’t activated within 30 days will be deleted. Users who have created or most recently refreshed
any sandbox for your organization will get at least two email notifications before we schedule the sandbox for deletion.
Locked Sandboxes
Sandboxes that have been locked for 60 days will be deleted. Users who have created or most recently refreshed any
sandbox for your organization will be notified prior to scheduling the sandbox for deletion. They will get at least three
email notifications over 30 days. Sandboxes become locked when all the licenses for that type of sandbox expire.
Unused Sandboxes
Sandboxes that no one has logged into for 180 days will be deleted. Users who have created or most recently refreshed
any sandbox for your organization will be notified prior to scheduling the sandbox for deletion. They will get at least
three email notifications over 30 days. To keep a sandbox active and avoid email notifications, log in periodically.
Based on licensing and usage, you might encounter the following scenarios. Follow the suggested resolutions:
Unable to Refresh a Particular Type of Sandbox
Cause—Your organization is using more sandboxes of a specific type than its sandbox licenses permit.
Example—Your organization has three full sandboxes, but only two full sandbox licenses.
Effect—You can't refresh a sandbox of this type. In the example, you can't refresh full sandboxes.
Resolution—Delete sandboxes to comply with the number allowed by your organization's sandbox licenses, or purchase
more sandbox licenses.
13
Deploy Enhancements from Sandboxes Deploy Your Changes
See Also:
Sandbox Overview
Creating or Refreshing a Sandbox
Managing Sandboxes
Sandbox Setup Tips and Considerations
From Setup, click Deploy to access tools used for migrating metadata changes between organizations.
Deployment Connections
In order to use the change sets feature, a deployment connection is required. You can specify connection permissions
for both outbound and inbound change sets on the Deployment Connections page.
14
Deploy Enhancements from Sandboxes Choose Your Tools for Developing and Deploying Changes
From Setup, click Deployments or Deploy > Monitor Deployments to monitor the progress of deployments made through
the Metadata API.
See Also:
Change Sets Overview
Monitoring Metadata Deployments
Whether you’re an administrator using point-and-click tools or a developer writing code, you can pick the right tool, work in
a sandbox, and deploy complete changes to a production organization. You can customize and code changes for your organization
in a sandbox using one, or more, of the tools provided by Salesforce.
The Developer Console is an integrated development environment with a collection of tools you can use to create, debug, and
test applications in your Salesforce organization.
To open the Developer Console, click Your name > Developer Console.
You can download the Force.com IDE to help you code projects for your organization. Using this tool, you can also compile
and test the code you write, synchronize changes in a sandboxt, and deploy your code to a production organization.
For more information, see the Force.com IDE page.
15
Deploy Enhancements from Sandboxes Choose Your Tools for Developing and Deploying Changes
Note: The Force.com IDE is a free resource provided by salesforce.com to support its users and partners, but is not
considered part of our Services for purposes of the salesforce.com Master Subscription Agreement.
See Also:
Develop and Deploy Using SOAP API
Choose Your Tools for Developing and Deploying Changes
You can use the SOAP API to develop and deploy changes to a development or sandbox organization, programmatically.
For more information about the SOAP API, and other API, see the SOAP API Developer’s Guide.
See Also:
Choose Your Tools for Developing and Deploying Changes
Download the Force.com Migration Tool if you want to perform a file-based deployment of metadata changes and Apex
classes from a Developer Edition or sandbox organization to a production organization using Apache's Ant build tool.
To download the Force.com Migration Tool:
The salesforce_ant.zip file contains the files you need to run an ant task that exercises the compileAndTest API call,
including:
16
Deploy Enhancements from Sandboxes Connect Organizations for Deployment
◊ A sample build.properties file that you must edit, specifying your credentials, in order to run the sample ant tasks
in build.xml
◊ A sample build.xml file, that exercises the deploy and retrieve API calls
Note: The Force.com Migration Tool is a free resource provided by salesforce.com to support its users and partners,
but is not considered part of our Services for purposes of the salesforce.com Master Subscription Agreement.
See Also:
Force.com Migration Tool Guide
Choose Your Tools for Developing and Deploying Changes
You can deploy workflows, rules, Apex classes and triggers, and other customization from a sandbox organization to your
production organization. You can create an outbound change set in the Salesforce user interface and add the components that
you would like to upload and deploy to the target organization. To access change sets, from Setup, click Deploy.
See Also:
Change Sets Overview
Choose Your Tools for Developing and Deploying Changes
Deployment Connections
User Permissions Needed
To edit deployment connections: “Deploy Change Sets”
In order for change sets to be sent from one organization to another, a deployment connection is required between the
organizations. Deployment connections can't be created between arbitrary organizations; instead, a deployment connection
is created between all organizations affiliated with a production organization. For example, if you have a production organization
(Prod) and two sandboxes (Dev and Test), a deployment connection is created between production and each sandbox (Prod
and Dev, and another connection between Prod and Test), as well as between the sandboxes (Dev and Test).
A deployment connection alone doesn't enable change sets to be sent between organizations. Each organization must be
authorized to send and receive change sets. This added level of security enforces code promotion paths and keeps organizations'
setup metadata from being overwritten by mistake.
For example, the following figure illustrates one possible migration path for a production organization and two sandboxes. In
this example, the production organization can only receive changes that have been fully tested, so only the Test sandbox is
authorized to upload change sets to production. In order to synchronize development projects with the production organization,
17
Deploy Enhancements from Sandboxes Connect Organizations for Deployment
the Prod organization can send change sets to the Dev sandbox, but not to the Test sandbox. Finally, because the features in
development need iterative testing, Dev and Test sandboxes should be able to send change sets back and forth.
Note: This illustration describes one possible code migration path. Your department must create its own policies for
organizations to send and receive change sets to one another.
See Also:
Deploying a Change Set
Viewing Available Deployment Connections
Authorizing a Deployment Connection
Viewing Details of a Deployment Connection
See Also:
Viewing Available Deployment Connections
Viewing Details of a Deployment Connection
Deployment Connections
18
Deploy Enhancements from Sandboxes Connect Organizations for Deployment
To view available connections, from Setup, click Deploy > Deployment Connections.
Action
Click Edit next to the organization that you want to allow or disallow change sets from.
Name
A list of organizations that have deployment connections to the organization you are currently logged into. Click the
name of an organization to view more information about the connection.
Description
A brief description of the connected organizations.
Type
The type of organization you are connected to. Possible values are Production, Full Copy Sandbox, Configuration Only
Sandbox, and Developer Sandbox.
See Also:
Authorizing a Deployment Connection
Viewing Details of a Deployment Connection
Deployment Connections
Name
The name of the selected organization. This is not the organization you are logged into.
Description
A brief description of the organization.
Type
The type of organization you are connected to. Possible values are Production, Full, Partial Data, Developer Pro, and
Developer.
19
Deploy Enhancements from Sandboxes Change Sets
See Also:
Authorizing a Deployment Connection
Viewing Available Deployment Connections
Deployment Connections
Change Sets
A change set is a means by which one organization can send customizations to another organization. For example, you could
create a new object in a sandbox organization and send it to your production organization using a change set. Change sets can
only contain modifications you can make through the Setup menu; therefore, you can't use a change set to upload a list of
contact records. In other words, change sets contain metadata, not data.
When you want to send customizations from your current organization to another organization, you create an outbound change
set. Once you send the change set, the receiving organization sees it as an inbound change set.
Sending a change set between two organizations requires a deployment connection. Change sets can only be sent between
organizations that are affiliated with a production organization—for example, a production organization and a sandbox, or
two sandboxes created from the same organization.
See Also:
Inbound Change Sets
Outbound Change Sets
Components Available in Change Sets
Special Behavior in Deployments
20
Deploy Enhancements from Sandboxes Change Sets
Developers can use permission sets or profile settings to specify permissions and other access settings in a change set. When
deciding whether to use permission sets, profile settings, or a combination of both, consider the similarities and differences.
Included permissions and settings that • Custom object permissions • Custom object permissions
require supporting components • Custom field permissions • Custom field permissions
• Apex class access • Apex class access
• Visualforce page access • Visualforce page access
For custom object permissions, custom field permissions, Visualforce page access, and Apex class access, you must include
supporting components in the change set. For example, object permissions for the custom object Items are included only if the
Items object is also included.
Note: Login IP ranges included in profile settings will overwrite the login IP ranges for any matching profiles in the
target organization.
See Also:
Inbound Change Sets
Outbound Change Sets
Note:
21
Deploy Enhancements from Sandboxes Change Sets
• If you create or modify components that aren’t available in a change set, you can't send those components from
one organization to another in a change set. In this case, migrate the changes manually by repeating the steps you
performed when you created or modified the component.
• List views and tabs are visible to all users when you deploy a change set. Change the visibility in the destination
organization if necessary.
22
Deploy Enhancements from Sandboxes Change Sets
• Folder
• Group
• Home Page Component
• Home Page Layout
• Letterhead
• Language Translation
• Lead Criteria Based Sharing Rule
• Lead Owner Sharing Rule
• List View
• Opportunity Criteria Based Sharing Rule
• Opportunity Owner Sharing Rule
• Page Layout
• Permission Set
• Post Templates for Approvals in Chatter
• Queue
• Record Type
• Remote Site
• Report
• Role
• S-Control
• Send Action
• Static resource
• Tab
• Territory
• User Criteria Based Sharing Rule
• User Membership Based Sharing Rule
• Validation Rule
• Visualforce Component
• Visualforce Page
• Workflow Email Alert
• Workflow Field Update
• Workflow Outbound Message
• Workflow Rule
• Workflow Task
• Workflow Time Trigger
See Also:
Validating a Change Set
Creating an Outbound Change Set
Selecting Components for an Outbound Change Set
Special Behavior in Deployments
23
Deploy Enhancements from Sandboxes Change Sets
• If the approval page fields include any custom fields on standard objects, you need to manually add those custom fields to
outbound change sets. The View/Add Dependencies option for selecting change set components won’t include these
fields.
• If the approval process references any post templates that contain custom fields, then you need to resave those post templates
in the originating organization before adding them to the change set. From Setup, click Create > Workflow & Approvals
> Post Templates. For each post template, click Edit and then Save.
• Change sets don’t include the order of active approval processes from the source organization. You may need to reorder
the approval processes in the destination organization after deployment.
• If you change the Unique Name of an approval process that was previously included in a change set and deployed in
another organization, and you resend the approval process via a change set, a new approval process will be created upon
deployment in the other organization. The previously deployed approval process will not be modified.
If a component in a change set refers to a specific user, such as recipients of workflow email notifications or dashboard
running users, then during deployment the system attempts to locate a matching user in the destination organization by
comparing usernames.
When you copy data to a sandbox, the fields containing usernames from the production organization are altered to
include the sandbox name. For example, in a sandbox named test, the username [email protected] becomes
24
Deploy Enhancements from Sandboxes Change Sets
[email protected]. During a deployment using change sets, the .test in the username is ignored. This process
transfers a user added to a component in one sandbox to other sandboxes or production organizations.
See Also:
Change Sets Best Practices
Special Behavior in Deployments
25
Deploy Enhancements from Sandboxes Change Sets
See Also:
Change Sets Implementation Tips
Special Behavior in Deployments
See Also:
Viewing Inbound Change Sets
Outbound Change Sets
Change Sets Overview
Note: Inbound change sets are permanently deleted six months after the change set is uploaded.
See Also:
Viewing Change Set Details
Validating a Change Set
Deploying a Change Set
26
Deploy Enhancements from Sandboxes Change Sets
See Also:
Viewing Inbound Change Sets
Validating a Change Set
Deploying a Change Set
Note: You can't make any changes to your organization while a test deployment is in progress.
See Also:
Viewing Inbound Change Sets
Viewing Change Set Details
Deploying a Change Set
A change set is deployed in a single transaction. If the deployment is unable to complete for any reason, the entire transaction
is rolled back. After a deployment completes successfully, all changes are committed to your organization and the deployment
can’t be rolled back.
27
Deploy Enhancements from Sandboxes Change Sets
Note: The Force.com platform requires that at least 75% of your code is covered by unit tests before you can deploy
it to a production organization. Ideally, you should strive for 100% coverage. The code coverage restriction is not
enforced for sandbox or Developer Edition organizations.
See Also:
Viewing Inbound Change Sets
Viewing Change Set Details
Special Behavior in Deployments
Monitoring Deployments
Monitoring Deployments
The size and complexity of the change set determines how long it takes for a change set to deploy. During this time, it can be
helpful to monitor the deployment. To track the status of deployments that are in progress from Setup, click Deploy > Inbound
Change Sets > Change Set Detail. Under the Deployment History related list, click View Results.
Note: The Monitor Deployments page can be used for checking the status of deployments made through the Metadata
API. However, change sets are not currently supported in the Monitor Deployments page.
See Also:
Deploying a Change Set
Deployment Connections
28
Deploy Enhancements from Sandboxes Change Sets
Note: Change sets are limited to 2,500 components and a total file size of 400 MB.
See Also:
Selecting Components for an Outbound Change Set
Creating an Outbound Change Set
Inbound Change Sets
Change Sets Overview
Note: Dependent components rely on the existence of other components. Unless you are certain that the dependent
components exist in every organization this change set will be deployed to, it's a good idea to add dependent
components to the change set.
See Also:
Creating an Outbound Change Set
Viewing and Adding Dependent Components to a Change Set
Components Available in Change Sets
29
Deploy Enhancements from Sandboxes Change Sets
Warning: If your change set contains more than 2500 dependencies you will only be able to see the first 2500 in the
view dependencies page.
See Also:
Selecting Components for an Outbound Change Set
Uploading an Outbound Change Set
Components Available in Change Sets
Note: Outbound change sets expire six months after upload, at which time the change set is permanently deleted.
See Also:
Uploading Change Sets During Server Upgrades
Creating an Outbound Change Set
See Also:
Cloning an Outbound Change Set
Outbound Change Set Validation Errors
30
Deploy Enhancements from Sandboxes Special Behavior in Deployments
3. Click Clone.
See Also:
Creating an Outbound Change Set
See Also:
Creating an Outbound Change Set
See Also:
Creating an Outbound Change Set
Uploading an Outbound Change Set
See Also:
Uploading an Outbound Change Set
31
Deploy Enhancements from Sandboxes Special Behavior in Deployments
When deploying changes to an organization, consider how individual components in your deployment behave so you’re
including all the changes you need to be successful. Use the following information to help you determine what to include in
your deployment, and how the changes appear in the destination organization. The behaviors listed in the Metadata API
section apply if you’re using the Force.com Migration Tool or Force.com IDE.
Custom Fields
• You cannot change the data type of a field using the Metadata API. You must manually make this change to the
target organization through the user interace.
Custom Object
You cannot change the sharingModel of an object using the Metadata API. You must manually make this change to
the target organization through the user interface.
Flows
• If you plan to deploy a flow using change sets, you must account for limitations in migration support. Make sure
your flows reference only fields and components available in change sets.
• You can only include one version of a flow in a change set.
• If the flow has no active version when you upload the outbound change set, the latest inactive version is used.
• When you view the dependent components for the change set, the Component Dependencies page lists the
dependencies for all versions of the flow. Add all interdependent components for the relevant flow version to the
outbound change set.
• An active flow in a change set will be inactive once deployed to its destination. You must manually activate it after
deployment.
• Deploying or re-deploying a flow using change sets will always create a new version of the flow in the destination
organization.
Permissions
See About Permission Sets and Profile Settings in Change Sets on page 21.
Page Layout
A deployment containing a profile and record type, but not the assigned page layout for that record type, removes the
existing layout assignment from the profile for that record type. Always include all page layouts for all required record
types in the change set.
32
Deploy Enhancements from Sandboxes Special Behavior in Deployments
Metadata API
Apex Classes and Apex Triggers
Cancel scheduled Apex jobs before deploying changes to Apex code. Reschedule the jobs after the deployment.
Approval Processes
• To use approval processes on Salesforce Knowledge articles with the Metadata API, the article type must be deployed.
For article version (_kav) in approval processes, the supported action types are: Knowledge Action, Email Alert, Field
Update, and Outbound Message.
• If the approval process references any post templates that contain custom fields, then you need to resave those post
templates in the originating organization before adding them to the change set. From Setup, click Create > Workflow
& Approvals > Post Templates. For each post template, click Edit and then Save.
• The metadata doesn’t include the order of active approval processes. You may need to reorder the approval processes
in the destination organization after deployment.
• If you change the Unique Name of an approval process that was previously included in a change set and deployed
in another organization, and you resend the approval process via a change set, a new approval process will be created
upon deployment in the other organization. The previously deployed approval process will not be modified.
Custom Fields
• While you can access Lookup and Picklist fields with the Metadata API, other standard fields cannot be accessed,
even though you can customize some of these fields in the UI
• You cannot change the data type of a field using the Metadata API. You must manually make this change to the
target organization through the user interace.
Custom Object
You cannot change the sharingModel of an object using the Metadata API. You must manually make this change to
the target organization through the user interface.
Connected App
• You cannot set the consumerKey in the Metadata API. It is included in a retrieve operation for informational
purposes. If you try to move the connected app to another organization, you must remove the consumerKey from
the .zip file before the deployment to an organization. A new key will be generated in the destination organization.
• Mobile settings of connected apps are not supported in change sets and must be manually migrated.
Page Layout
A deployment containing page layout assignments replaces all existing page layout assignments in the destination
organization with those specified in the .zip file. Existing page layouts in the organization disappear if they’re not included
in the .zip file. Always include all page layouts for all required record types in the .zip file.
See Also:
Deploying a Change Set
Change Sets Overview
Components Available in Change Sets
Working with the Zip File
33
Deploy Enhancements from Sandboxes Monitoring Metadata Deployments
You can use the Metadata API to deploy XML file representations of components into an organization. A component is an
instance of a metadata type in the Metadata API. For example, CustomObject is a metadata type for custom objects, and the
MyCustomObject__c component is an instance of a custom object.
The easiest way to access the Metadata API is to use the Force.com IDE or Force.com Migration Tool. These tools are built
on top of the Metadata API and use the standard Eclipse and Ant tools respectively to simplify the task of working with the
Metadata API.
The deploy call in the Metadata API is asynchronous and may take a while to complete. The Force.com IDE and Force.com
Migration Tool use the deploy call to move XML file representations of components into an organization. To track the status
of deployments that are in progress or completed in the last 7 days for these tools or other clients that are deploying metadata,
from Setup, click Deployments or Deploy > Monitor Deployments.
On the Monitoring Deployments page, you can cancel a deployment while it’s in progress. To cancel a deployment, click
Cancel. The deployment then has the status “Cancel Requested” until the deployment is completely canceled.
The Deployments In Progress list contains the following columns.
Column Description
Deployment A unique identifier used to track the deployment.
Id
34
Deploy Enhancements from Sandboxes Monitoring Metadata Deployments
Column Description
• Failed—No changes were committed to the organization because files were missing, components had
errors, or tests failed.
Components The progress of the deployment. For example, 10 / 15 (3 errors) indicates that ten components
have been processed successfully out of a total of 15. There were errors for three other components processed
so far.
Tests The progress of the Apex tests that have been run. For example, 13 / 20 (2 errors) indicates that
13 tests have been run successfully out of a total of 20. There were errors for two other tests that have run
so far. The value for the total number of tests is not accurate until the test phase of the deployment has
started.
The Completed Deployments Last 7 days list contains the following columns. Completed deployments are removed from the
list 7 days after completion.
Column Description
Deployment A unique identifier used to track the deployment.
Id
Components The number of components, including those with errors, that were processed in the deployment. For
example, 10 (1 error) indicates that ten components were processed and there was an error for one
component.
Tests The number of Apex tests, including those with errors, that were run. For example, 13 (2 errors)
indicates that 13 tests were run and there were errors for two tests.
See Also:
Inbound Change Sets
Outbound Change Sets
35
Index
Index
A Deployment
monitoring 28
Ant task for Apex 15–16 Deployment issues 31
Apex Deployment monitoring 34
tools 15
Approval processes
change set restrictions 23 I
Inbound change set 17–18, 26
C
Change sets M
approval process restrictions 23 Metadata API
best practices 25 deployments 34
cloning 30 Metadata components in change sets 21
deleting 31 Monitoring deployment 28
dependent components 29 Monitoring metadata deployments 34
deploying 27
deployment 26
deployment connections 17–19 O
details 27 Organization
implementation tips 24 copy 1
inbound 26 Outbound change set 17–18, 28, 30–31
outbound 28, 30–31 Outbound change sets
permission sets and profiles 21 selecting components 29
permissions 20 version errors 31
selecting components 29
testing before deployment 27
S
version errors 31
Cloning a change set 30 Sandbox
Components in deployments 31 creating 3
Copy implementation tips 9
organization 1 licenses 13
managing 7
D refreshing 3
restrictions 13
Deleting a change set 31 Sandbox data template 6
Dependent components 29
Deploying
using Change Sets 17
T
using SOAP API 16 Test database 6
using the Force.com IDE 15 Tools for Apex 15
using the Force.com Migration Tool 16
36