Find your content:

Search form

You are here

Copying metadata and code from one Production org to another

 
Share

How do I copy(for want of a better word) metadata (i.e. Objects, Workflows, Validation rule etc), and code (Apex, Visualforce, Triggers) from one Production org to another production org?

Is this even possible? I know that Change Sets won't help here since they work only within an org.

Thanks!


Attribution to: Anup

Possible Suggestion/Solution #1

You can use the Force.com IDE to do this. Follow the download and installation instructions here: Force.com IDE Installation

Once the Force.com IDE is installed, create a new project and provide the source org's login information and choose all meta-data objects you want to deploy to another org. Once they've all be downloaded into your project, right-click on the project and select "Force.com->Deploy to Server" and the tool will walk you through the process with a wizard.


Attribution to: E.J. Wilburn

Possible Suggestion/Solution #2

You can also use the Ant based Force.com Migration Tool:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_ant.htm


Attribution to: joshbirk

Possible Suggestion/Solution #3

I should point out that the following items cannot be deployed through Eclipse (at least from what I can find):

  • Approval Workflows (Available as of Summer '13)
  • Chatter Settings
  • UI Settings
  • Lead Settings
  • Email Settings
  • Organization Settings
  • Outlook Configurations
  • Offline Configurations
  • Mobile Configurations
  • Lead Assignment Rules
  • Case Assignment Rules
  • Custom Object Criteria Based Sharing Rules
  • Content
  • Knowledge
  • Ideas
  • Queues (not positive on this since I know Groups can be deployed now)
  • Time-Dependent Actions (the rules can be deployed, but the time-dependent part needs to be re-created)
  • Email Services
  • Scheduled ApexJobs/Reports/Dashboards
  • OrgWide Email Addresses
  • Renamed Fields/Objects
  • Individual Users Email Signatures, Chatter Settings, Outlook Configuration, Offline Settings, Personal Groups, Update Reminder Settings
  • All Reports, Dashboards or Email Templates that are in a users "My Personal Reports" or "My Personal Templates" folder
  • All Private List Views
  • Anything considered "Data" (with the exception of Documents, which for some reason can be deployed through Eclipse).

Attribution to: Force2b_Mike

Possible Suggestion/Solution #4

Another mechanism is to create an unmanaged package. The list of package-able components (from the relevant page in the ISVforce Guide):

  • Analytic Snapshot
  • Apex Class
  • Apex Sharing Reason
  • Apex Sharing Recalculation
  • Apex Trigger
  • Application
  • Article Type
  • Custom Button or Link
  • Custom Field
  • Custom Label
  • Custom Object
  • Custom Report Type
  • Custom Setting
  • Dashboard
  • Document
  • Email Template
  • Field Set
  • Folder
  • Home Page Component
  • Home Page Layout
  • Letterhead
  • List View
  • Page Layout
  • Permission Set
  • Record Type
  • Remote Site Setting
  • Report
  • S-Control
  • Static Resource
  • Tab
  • Translation
  • Validation Rule
  • Visualforce Component
  • Visualforce Page
  • Workflow Email Alert
  • Workflow Field Update
  • Workflow Outbound Message
  • Workflow Rule
  • Workflow Task

Attribution to: metadaddy

Possible Suggestion/Solution #5

SnapShot (http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016YhyEAE) can migrate from any Org to any Org (as long as you have admin credentials). This includes migrating profiles, partial profiles - only FLS of one field but not the other etc., objects, workflows etc. You can even edit the profiles to update security settings en masse before migrating it to the destination.

This is a paid app on AppExchange.

Disclaimer: I work for DreamFactory, the makers of SnapShot.


Attribution to: Sridhar

Possible Suggestion/Solution #6

What about the DOT process? Especially for a 1-off copy. This refers to the option of creating (or having SFDC create) a 'DOT' template - this can include or exclude data, and obviously includes the full org meta-data.

We use this process at Veeva - for large deployments across multi countries, we often end up with several 'child' production orgs, cloned from a master org. We use the DOT process for this - no IDE/API calls required, and from the end admin perspective it's generally just down to creating the DOT template, then logging a SFDC case to use this to create a new production org.

Not sure if this is generally available to the whole SFDC community, we are an ISV/OEM partner so might get this through that agreement, but thought I would put this as another option - again, for 1-offs it is a lot simpler than using API/IDE/other tools. Has anyone else used this/seen it used? If not then I'll remove this, but wanted to throw it out there...


Attribution to: Stephen B

Possible Suggestion/Solution #7

Another way I suppose would be to, instead of using ANT, use Workbench with a .zip file containing xml files. More info on this can be found on the answer by sfdcfox here.

Finally, another way to achieve this with MavensMate and Sublime Text 3 (i.e. without having to use Force.com IDE) can be found here.


Attribution to: Andy Hitchings
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/47

My Block Status

My Block Content