If you want access to all the related objects and records from a record detail page, you can add a tab and embed as many grids as you like into it via the GridBuddy Lightning Components. Note that to use GridBuddy Lightning Components, My Domain has to be enabled in your org.
Step 1: Create your grids the way you usually do
Decision time: If you want to embed multiple grids in a tabbed format onto a record detail page, continue to Step #2. If you want to embed a single grid onto a record detail page, skip to Step #3
Step 2: Create the tabbed page with all the grids that you want to appear
- Launch the Grid Wizard
- Click 'Managed Tabbed Pages'
- Click ‘new’ to create a new tabbed page
- Enter a title for the page.
- Optional: Check ‘global buttons’ & ‘Salesforce header’
- Click ‘add tab’ and select a grid from the ‘content’ dropdown menu. These grids will appear as a tab on the page in the order that you select them here.
- Add fpf (filter by parent field) and fpv (filter by parent value) parameters to dynamically filter it by the record it is embedded on.
- FPF tells the grid to look for a certain field on the grid
- FPV tells the grid that once it finds the FPF field, to filter it by the page it's embedded onto.
For example:
- On an Account record, if I’ve embedded a Contact grid, my FPF/FPV might be: fpf=AccountId&fpv={recordId}
- The grid looks for the AccountId field and filters it by recordId of the page it's embedded onto
- Standard objects look like this:...&fpf=AccountId&fpv={!Account.Id}
- Custom objects look like this:...&fpf=Account__c&fpv={!Account.Id}
- Click ‘save’
Step 3: Add a tab on a record detail page
- Go to the record detail page onto which you want to embed your grid
- Click ‘edit page’
- Click on the existing tabbed area. This will open the “Page>Tabs” editable area on the right side of the page.
- Click “Add Tab” and select “Tab Label = Custom”, then type whatever tab title you’d like into the Custom Tab Label field.
- Drag the new tab up or down to put it in your preferred location
Step 4: Embed a grid(s) into your new tab
- Confirm that My Domains is enabled for this org.
- Click the new tab that you just created
- Scroll down to “Custom – Managed” in the left menu.
- You can select either “GridBuddy Grid” (to embed a single grid) or “GridBuddy Tabbed Page” (to embed a managed tabbed page).
- Drag the GB component of your choice into the body of the new tab
- Click on the GB component you just placed. This will open the Page > GridBuddy Grid/Tabbed Page pane on the right side of the screen
- 'GridBuddy Tabbed Page' Lightning Component
- In the GridBuddy Tabbed Page pane, select the page name from the dropdown menu. This list will show you the tabbed pages you have built in Managed Tabbed Pages
- Set the component height
- Click ‘save’ and then click ‘back’ to load the page with your new tab and embedded grid(s) on it.
- 'GridBuddy Grid' Lightning Component
- In the GridBuddy Grid pane, select the grid name from the dropdown menu on the right. This list will show you all grids that you have built in this org.
- Set optional filter parameters. This will filter the grid so that it only shows results related to the page it is embedded on.
- Note: If you do not place filter parameters on the grid, it will show you complete results (vs. results only relevant to the detail page where you’ve embedded it)
- For example, to pull only relevant Contacts onto an Account page, you could use these parameters on a Contact grid: fpf=AccountId&fpv={recordId}
- Set the component height
- Click ‘save’ and then click ‘back’ to load the page with your new tab and embedded grid(s) on it.