As of GridBuddy version 3.19, Grids can be migrated between organizations by simply exporting records from the GBLite__GridBuddySettings__c custom object from one organization, and importing these records into the GBLite__GridBuddySettings__c custom object of the target organization.
Currently, Folders cannot be migrated, but can be easily recreated by using the Manage Folders page, accessed from the Grid Wizard > Manage Folders link.
Note: both the source and target organizations must have GridBuddy version 3.19 or higher installed.
1. Export Grids
In your source org:
- Go to Setup | Administration Setup | Data Management | Data Export
- Click Export Now or Schedule Export (or alternatively use a different data migration tool)
- Choose the Unicode (UTF-8) encoding, leave the other options as they are
- Select GBLite__GridBuddySettings__c
- Click Start Export
Once the export is done, download the file, open the CSV and remove the following columns:
-
- Id
- OwnerId
- IsDeleted
- Name
- CreatedDate
- CreatedById
- LastModifiedDate
- LastModifiedById
- SystemModstamp
Lastly, remove any records where the GBLite__Default_Definition__c column has a value of “0”.
2. Export Grid Actions and Tabbed Pages
In your source org:
- Go to Setup | Administration Setup | Data Management | Data Export
- Click Export Now or Schedule Export (or alternatively use a different data migration tool)
- Choose the Unicode (UTF-8) encoding, leave the other options as they are
- Select GBLite__GB_Global_Meta__c
- Click Start Export
Once the export is done, download the file, open the CSV and remove the following columns:
-
- OwnerId
- IsDeleted
- CreatedDate
- CreatedById
- LastModifiedDate
- LastModifiedById
- SystemModstamp
Note: Do not remove the Id column, so that Actions can maintain their relationship to Grids.
Remove any records where the GBLite__Type__c column value is not “Action” or “Tabbed Page”. Only “Action” and “Tabbed Page” records should remain in the CSV.
3. Remove Grids From the Target Org
If you’re going to import Grids into an org that already has Grids with the same names, it is strongly recommended to delete them first to avoid duplicates in the GridBuddy application. This can be done by deleting records from a list view of the GBLite__GridBuddySettings__c object, or running the following statement in Execute Anonymous:
database.delete([select Id from GBLite__GridBuddySettings__c]);
4. Import Grids into the Target Org
Now we’re ready to import Grids:
- From the Data Import Wizard, which is under Setup > Data Management > Data Import Wizard
- Click the “Launch Wizard!” button
Importing Grids – Import Wizard
- On the “Import your Data into Salesforce” page, select “Custom Object” tab in the “What kind of data are you importing?” section
- Select the GridBuddySettings object under the “What kind of data are you importing?” section
- Select “Add new records” under the “What do you want to do?” section
- Select the “Unicode (UTF8)” option in the dropdown in the Character Code subsection of the “Where is your data located?” section.
- Click the “Next” button
- On the “Edit Field Mapping: GridBuddySettings” page, map each field
-
- Click Map for the GBLite__Custom_CSS_File__c CSV Header and select Custom CSS File for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Custom_JS_File__c CSV Header and select Custom JS File for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Default_Definition__c CSV Header and select Default Definition for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Definition__c CSV Header and select Definition for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Grid_Name__c CSV Header and select Grid Name for the Mapped Salesforce Object, then click the Map button in the popup
- On the “Review & Start Import” page, click the “Start Import” button
5. Import Grid Actions and Tabbed Pages into the Target Org
Now we’re ready to import Grid Actions and Tabbed Pages:
- From the Data Import Wizard, which is under Setup > Data Management > Data Import Wizard
- Click the “Launch Wizard!” button
- On the “Import your Data into Salesforce” page, select “Custom Object” tab in the “What kind of data are you importing?” section
- Select the GB Global Meta object under the “What kind of data are you importing?” section
- Select “Add new and update existing records” under the “What do you want to do?” section
- Click CSV and browse to the exported file
- Match by: Salesforce.com ID
- Which User field in your file designates record owners? Leave as –None–
- Trigger workflow rules and processes? Leave unchecked
- Select the “Unicode (UTF8)” Character Code
- Click the “Next” button
- On the “Edit Field Mapping: GB Global Meta” page, map each field
-
- Click Map for the GBLite__Controlling_Field__c CSV Header and select “Controlling Field” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Grid_Name__c CSV Header and select “Grid Name” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Object_API_Name__c CSV Header and select “Object API Name” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Object_Dot_Field_Name__c CSV Header and select “Object Dot Field Name” for the Mapped Salesforce Object, then click the Mapbutton in the popup
- Click Map for the GBLite__Picklist_Meta__c CSV Header and select “Picklist Meta” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Request_Status__c CSV Header and select “Request Status” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Response_Message__c CSV Header and select “Response Message” for the Mapped Salesforce Object, then click the Map button in the popup
- Click Map for the GBLite__Type__c CSV Header and select “Type” for the Mapped Salesforce Object, then click the Map button in the popup
- On the “Review & Start Import” page, click the “Start Import” button
Once the import has completed: Actions that were associated to Grids prior to import should still be associated after import. Tabbed Pages will work as expected provided the grids defined in the tabbed page definitions exist in the target org.