This article discusses tips and tricks regarding metadata migration using Snapshot.
- Snapshot will automatically fetch changes made to the Org after your backup date. So, if there were any deployments or Setup Audit Trail changes found, that particular list of changes are displayed.
- Deployment History is given precedence over Setup Audit Trail. So, if there are manual changes and deployment executed, Deployment History values are displayed.
- You can start a metadata backup using the Take Source Snapshot (or Take Destination Snapshot) feature. This is an option available in both of the dropdowns.
- The deployment job list from your previous deployment is retained and can be reused. If you do not want to use the same job list, please use the Remove All to clear the job list before continuing.
- You can multi-select metadata types from the first column and then execute Add Missing or Add Different on only those metadata types.
- You can see the XML level differences using the slider above the metadata assets to see the differences between the source and destination asset. This will only work for the selected asset. So, if you haven't selected an asset, please select an asset below and it will display the XML differences.
- You can import (replace), merge (with existing job list), copy (to clipboard), export (to file) job list using the Manage Job List dropdown.
- If your destination is a production Org, there is a very good chance that you will be expected to run some Apex tests to meet the 75% Apex coverage. If you choose to Run Apex Tests, the default is All Unmanaged Tests. You can choose to run All Tests or Selected Tests or All Managed Tests or No Tests. This can be managed by using the Manage link next to the Run Apex Tests checkbox.
- Apply Transforms can help you change metadata as part of the deployment. You can even change filenames which is useful if you want to convert managed packages to unmanaged package etc.
- You can automatically remove unnecessary references in Profiles, Permission Sets, Page Layouts, Record Types, Compact Layouts etc. using the Remove References checkbox. If you want to provide some strings to remove out these above mentioned metadata types, click the Manage link and then you can use the text area provided to specify these strings. SocialPost and SocialPersona are added by default.
- Your job list is automatically stored as part of your migration in the Snapshot Deployment object. This is useful if you need to reuse a migration job list that was executed between a different source/ destination combination - for example, you want to migrate the exact job list from QA to Staging as you did from Dev to QA.
- When you execute a Change Everything Possible and Ignore Errors migration, the Metadata API will round up metadata assets and ignore them in case of errors. For example, if I am migrating two objects - Account and Opportunity. If a single field in Account errors out, the entire Account object will dropped but the Opportunity object deployment will still continue.
- You should provide a job name as part of your migration. This is not a required field. However, this will help you keep track of important migrations and then recall/ reuse them at a later date. If you do not provide a job name, Snapshot will assign the date/ time as the job name.