If you are migrating brand new grids that do not exist in the destination environment, follow these steps. If you are migrating grids that do exist in the destination environment and have been updated for this launch, follow the instructions in the "GridBuddy Install and Migration Guide: Upserting grids (existing and net new)" article.
Migrate the Configuration from Sandbox
- Create an outbound change set that includes Salesforce artifacts to be migrated:
- Any Visualforce pages created that reference GridBuddy (these will be prefixed by GBTabs_ if they were created using Grid Wizard > Manage Tabbed Pages)
- Any Lightning Components that reference GridBuddy
- Any affected page layouts (e.g. Account record detail page with embedded grids)
- Deploy the change set to Production
Export Grids from the Sandbox
- Use Dataloader.io to export GridBuddySettings from the sandbox. Please note that other export tools may require different steps to achieve the below filters.
- Click “New Task”
- Click “Export”
- Type “GridBuddy” and select GridBuddy Settings
- Select the following columns for export:
- Record ID
- GridBuddySettings Name
- Custom CSS File
- Custom JS File
- Default Definition
- Definition
- Grid Name
- Apply the following filters on the GridBuddySettings export in Data Loader:
- Default Definition = TRUE
- This will exclude all user-defined filters that were created in the Sandbox
- If you would like to include user-defined filters in your migration, do not include filter ‘Default Definition = TRUE’ on your GridBuddySettings export.
- Grid Name= GridName1 [click the + and add another filter for another grid name]
- Default Definition = TRUE
- Create one filter for every grid that you WANT to migrate from this sandbox
- This filter should exclude the grids that you DON’T want? to migrate
- SOQL query:
- These filters dynamically populate the SOQL query. You can also work directly in the SOQL quary, but once you edit the query you can’t edit the filters anymore until you click ‘reset’ (specific to Dataloader.io).
- After you have created one filter for every grid name that you want to migrate, edit the SOQL query:
- Put a parenthesis around the grid name section, beginning after the AND and ending at the end of the query
- Change the “AND” to “OR” between each grid name
- For example: SELECT GBLite__Custom_CSS_File__c, GBLite__Custom_JS_File__c, GBLite__Default_Definition__c, GBLite__Definition__c, GBLite__Grid_Name__c, Name FROM GBLite__GridBuddySettings__c WHERE GBLite__Default_Definition__c = trueAND? (GBLite__Grid_Name__c = ?'Grid Name 1' ?OR GBLite__Grid_Name__c = ?'Grid Name 2' ?OR GBLite__Grid_Name__c = ?'Grid Name 3'?)
- Click “Next”, then click “Save and Run”
- Export the file by clicking “# Successes”
- IMPORTANT: Do not open this file in Excel as certain field metadata may exceed the max in Excel and corrupt the columns. It can be opened in Google Sheets or any other .csv supporting application or Text Editor?.
- Save this file as a CSV file with the name GridsToInsert.csv
Create Export of GB Global Meta file from Sandbox
- Use Data Loader to export the GB Global Meta records from the team-specific sandbox. Please note that other export tools may require different steps to achieve the below filters.
- Click “New Task”
- Click “Export”
- Type “Global Meta” and select GB Global Meta
- Select the following columns for export:
- Original Record Id (Essential! This field allows actions and custom code components can maintain their relationship to Grids through Id)
- GB Global Meta Name
- Controlling Field
- Grid Name
- Object API Name
- Object Dot Field Name
- Picklist Meta
- Request Status
- Response Message
- Scope
- Summary
- Type
- Type = _ Create one filter for each of the below Types: [click the + and add another filter for another type]
- Note on the SOQL query: These filters dynamically populate the SOQL query. You can also work directly in the SOQL query, but once you edit the query you can’t edit the filters anymore until you click ‘reset’ (specific to Dataloader.io).
- Types to include in your filter:
- Action
- Tabbed Page
- Custom Code - CSS
- Custom Code - JavaScript
- Custom Code - Global CSS
- Custom Code - Global JavaScript
- Theme - Grid
- Theme - Global
- After you have created one filter for the above 8 types, edit the SOQL query:
- Change the “AND” to “OR” between each Type
- For example: SELECT Id, GBLite__Controlling_Field__c, Name, GBLite__Grid_Name__c, GBLite__Object_API_Name__c, GBLite__Object_Dot_Field_Name__c, GBLite__Picklist_Meta__c, GBLite__Request_Status__c, GBLite__Response_Message__c, GBLite__Scope__c, GBLite__Summary__c, GBLite__Type__c FROM GBLite__GB_Global_Meta__c WHERE GBLite__Type__c = 'Action' OR GBLite__Type__c = 'Tabbed Page' OR GBLite__Type__c = 'Custom Code - Global CSS' OR GBLite__Type__c = 'Custom Code - Global JavaScript' OR GBLite__Type__c = 'Custom Code - CSS' OR GBLite__Type__c = 'Custom Code - JavaScript' OR GBLite__Type__c = 'Theme - Global' OR GBLite__Type__c = 'Theme - Grid'
- Click “Next”, then click “Save and Run”
- Export the file by clicking “# Successes”
- IMPORTANT: Do not open this file in Excel as certain field metadata may exceed the max in Excel and corrupt the columns. It can be opened in Google Sheets or any other .csv supporting application or Text Editor?. Save this file as a CSV file with the name GBGlobalMetaToInsert.csv
Delete existing files from your destination environment
- GridBuddy Settings can be imported without deleting the same file from the destination environment, since all the grids included in the launch are net-new
- Delete GridBuddy metadata (‘GBLite__GB_Global_Meta__c’ records) from the destination environment
- This deletion is necessary to avoid duplicate metadata in the destination environment after the import is complete.
- WARNING: When GB metadata is deleted, the grids won't reflect any of the metadata from the GridBuddy metadata service until it is imported in step 6.
Insert GridBuddy Settings Definitions
- Use Data Loader to insert GridBuddySettings (GBLite__GridBuddySettings__c) using the CSV created earlier (GridsToInsert.csv).
Insert GB Global Meta Definitions
-
Use Data Loader to update GB Global Meta (GBLite__GB_Global_Meta__c)using the CSV created earlier (GBGlobalMetaToInsert.csv).
Refresh GridBuddy Metadata
- Navigate to the Grid Wizard
- In the Manage Grid Meta Data, click on the “Refresh All Grid Meta Data” link