Many organizations use Sandbox as an environment to develop and test configuration changes before deploying to their Production instance. We all know that you can refresh Sandbox from Production, but what if you wanted to deploy changes from Sandbox to Production?
Instead of the laborious and time-consuming task of recreating their changes in Production, in some cases customers should consider bundling up their development work as a private, password-protected Force.com AppExchange package, which can then be downloaded and installed into their Production Instance.
Longer term, the solution to this need is to use the Meta data API via one of the internal or partner tools that make use of it. This API was introduced in Summer '07 and today supports a subset of setup types. Today these tools include the Force.com IDE, the Force.com Meta data Ant task, and an AppExchange app, Dreamfactory Snapshot (discussed below).
- Faster, simpler deployment
- Minimizes errors
What can be bundled in a package?
- Attachments (to email templates)
- Custom links
- Custom objects (Including all custom fields, relationships (master-detail and lookup), picklist values, page layouts, related list layouts, search layouts, public list views, and custom links)
- Custom reports
- Custom s-controls
- Custom tab
- Email templates (Including any letterheads)
- Custom apps
- Cannot package page layouts associated with Standard Objects
- Cannot package data
- Unmanaged packages can only install new items (eg a custom object) to an org, it cannot modify items already present in destination org
- Managed packages are neither intended nor appropriate for this solution, they are for apps for sale on AppExchange
To make sandbox configuration setup available for copy to production or to other sandbox:
- Create a new unmanaged package on the source org: Setup | Create | Package, give name, version, description, etc.and [Save]
- In Package Components section click [Add] button
- Select "Component Type" picklist, then check boxes for items to include in the package
- Click [Add To Package} button at top before changing "Component Type" again
- Click [Cancel] when done adding components to the package
- Click [Upload] button on package main screen and wait for URL to be shown (also emailed to you)
To download that package on a different org:
- Use the URL produced above, changing "test.salesforce.com" to "login.salesforce.com" if copying to production
- Follow the steps to download the changes
Viewing Salesforce Schema
Many customers have asked about the ability to view and document the schema of their Salesfroce CRM instance. Besides looking at their Enterprise WSDL (which is not user-friendly), what options are available?
-Force.com IDE, or a command-line ANT Tool
There are 2 AppExchange Apps that provide this capability to customers:
- Developers' Sidekick
Of the two, Snapshot is more robust, with more feature-rich functionality (such as the ability to compare configurations over time, or between two instances - Sandbox vs. Production, and the ability to inspect security settings by profile)
A synopsis of each tool as provided by the developers:
Developers Sidekick loads your salesforce.com schema on log-in, and shows all your salesforce.com objects and attributes instantly saving time on searching.
The Developers Helper lets you select an object and display its standard and custom attributes in a copy-enabled window - allowing you to cut and paste text directly to your project. It also includes the option to add standard programming punctuation such as brackets, commas and quotes.
The Schema Browser displays an overview of the information contained within the Force.com API for each object and attribute.
SnapShot is an indispensable tool to document the changes and modifications to your salesforce.com instance, and to aid with Sarbanes-Oxley compliance or HIPAA regulations. SnapShot can be used in three main ways:
1. Changes to an instance can be compared over time. For example, SnapShot can be used to take a monthly picture of an instance which is archived by date. This provides an important level of security by documenting all instance modifications and changes at the schema level.
2. Entirely different instances can be examined side by side. SnapShot will let you log into any instance and take a picture. This feature provides important feedback for System Integrators about the exact differences between the instances that they are working on.
2a. When used to compare a Sandbox in which development has been taking place to the antecedent production org, Snapshot can produce a change list to be used to recreate changes in production.
2b. For those changes that are supported by the Metadata API, Snapshot is able to write the changes to the destination org.
3. The security settings for each user profile can be inspected inside a given instance. Change the profile for a test user and take a SnapShot. Then compare the object permissions, security settings, and field visibility between different user profiles and the instance administrator.