As GoMeddo data is stored in Salesforce records, this requires some considerations when looking at deploying across Salesforce orgs. The best approach will depend on the situation.
As most of the GoMeddo configuration resides in Salesforce records and not in metadata, you can’t easily deploy it across orgs. Instead, configuration records will either need to be manually recreated, exported / imported using Data Loader, or inserted using a script. Consider beforehand what the best approach is for the given use case. For small implementations, manual recreation won’t be a problem, but for larger implementations you may want to invest in a script to easily deploy records to sandboxes for example.
Bottom line, always consider the volume of configuration records you will be creating, as this will impact the effort to migrate across orgs.
Best practices for deploys
Low number of records, occasional deploy | Manually recreate |
---|---|
Large number of records, occasional deploy | Data Loader |
Regular deploy | Script - see below |
Script: SFDX Data Move Utility
With the help of the SFDMU plugin for the SF CLI, you can follow these steps to migrate general GoMeddo configuration data, as well as more general-use oriented data such as Resources, Staff and Availabilities
Move configuration data
Install SFDMU
Start with downloading and installing the SFDMU plugin:
https://github.com/forcedotcom/SFDX-Data-Move-Utility
Download JSON
We prepared an export.json that you can use to migrate configuration data between orgs and that you can use to import data from one environment into another.
Perform the following steps to migrate this data between orgs
Install the Salesforce CLI by following the steps mentioned here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm
Authorise the source-org (so the org where the data is currently is with the help of the the
sf org login web
command) https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_org_commands_unified.htm#cli_reference_org_login_web_unifiedAuthorise the target-org (so the org where the data should be going)
Install the SFDMU plugin by running
sfdx plugins:install sfdmu
in a terminalDownload the export.json and store it somewhere where you can find it.
Navigate your terminal to the folder where the export.json is stored
Run the following command, replace the usernames of the target and the source with the usernames you used to authorise the orgs in step 2 and 3.
sfdx sfdmu:run --sourceusername <SOURCE_USERNAME> --targetusername <TARGET_USERNAME>
Data should be appearing in the new org and any errors will be reported in your terminal.
Move Resource (Types), Staff, Availability records
Assuming you have gone through the steps of migrating all configuration with the SFDMU, you can also migrate the Resources, Resource Types, Staff and Availabilities between environments.
We assume you have performed step 1 to 4 from the previous section and installed the CLI and plugin and authorised yourself.
Make sure to create two Custom Settings to disable two Triggers on Resource and Resource Type as described here
Disable Resource
andDisable ResourceType
Download and navigate to the zip file and unzip
Navigate your Terminal to the folder where the export.json is stored after unzipping
Run the following command, replace the usernames of the target and the source with the usernames you used to authorise the orgs in step 2 and 3 from the previous section.
sfdx sfdmu:run --sourceusername <SOURCE_USERNAME> --targetusername <TARGET_USERNAME>
Refreshing a sandbox
More information on this can be found here.