Copying an Org
I have one org, that I need to copy to an new org. It is a VERY simple structure - just Accounts, Contacts and Opps and 3 custom objects that are children of Opps. The business has split and they now need two orgs that start out the same.Â
So I thought, easy, let's just use the Metadata API to copy from one org to another.Â
Nope, not so easy.Â
Here are the things I needed to do in my new Org to be able to simply Copy over the structure.Â
Setup
- Set Sharing Rules
- Turn on State and Country Picklists
- Turn on Multi Currency (which of course requires you to contact support, AFTER setting the Enable Multicurrency checkbox AND granting access to your Org).Â
- Enable One Contact to Many Accounts.Â
Account
- Turn on History Tracking
- Even then the metadata had a dummy spit and I had to remove all field history tracking from my XML due to this https://success.salesforce.com/issues_view?id=a1p30000000T5hTAAS
- I had to delete the Search Layouts metadata.Â
- Add all values to Standard Picklist Fields
- Manually add RecordTypes
- Remove CurrencyISOCode field until multi Currency is enabled.Â
- Delete all references to fields and weblinks and FieldSets from three managed packages that I probably won't install in the new org.Â
Contact
- Remove CurrencyISOCode field until multi Currency is enabled.Â
- Remove all Field History Tracking references
- Delete all references to fields and weblinks and FieldSets from three managed packages that I probably won't install in the new org.Â
Opportunity
- Manually add RecordTypes
- Remove all Field History Tracking references
- Remove CurrencyISOCode field until multi Currency is enabled.Â
- Delete all references to weblinks from three managed packages that I probably won't install in the new org.Â
Custom Objects
- Create Custom Objects Manually
- Create Record Types Manually
- Create Page Layouts Manually
- Set Feed Tracking on Custom Objects
- Refresh metadata to bring in new Objects and Page Layouts into the Metadata
- Delete a few dozen Validation Rules and Custom Fields with formulas where they would not save via Metadata - then I will have to go and find them again and create them manually.Â
Layouts
- Create all the Layouts manually
- Refresh the metadata
- Copy over all the Layouts
Perms
- Create the profiles manually
- Reset all the profiles - thankfully The Welkin Suite makes this easy.Â