Editable Related Lists on Salesforce Record Detail Pages


Editable Related Lists on Salesforce Record Detail Pages

Posted by Jack Agosthazi on Apr 21, 2014 11:35:00 AM | Share


With just a little Visualforce, you can use GridBuddy to include related lists in your Salesforce record detail pages that allow inline edits and inline creates. These related lists can show more than 5 records per list, and you can filter the records in each related list to only include the records you want.

For example, say we defined a GridBuddy Grid of Accounts with related Tasks and Opportunities. Normally, this grid would show a list of Account records and their related Tasks and Opportunities. Now, you can pass the ID of a specific Account record into the URL of a Grid and only see the Task and Opportunities related to that Account record. This means you can have an Account record detail page where you can inline edit and inline create related Tasks and Opportunities without ever leaving the Account page. Pretty cool, right!

Here is a screenshot of an Account record detail page with editable lists for the related Tasks and Opportunities:


Several Visualforce techniques can be utilized to alter your record detail pages to incorporate these powerful related lists. Here are a couple of quick and easy ones.

Create a Grid for the Object You Want GridBuddy Related Lists On

If you want a GridBuddy related list for Accounts, choose Account as the parent and select 1 Account field on Grid Wizard 2. Then select the child object fields.

describe the image 

Include a Visualforce Component into the Current Page Layout

Step 1: Create a Visualforce Page with our new Embed Grid feature.

1. Go to your Grid, click configure

GridBuddy Salesforce App

2. Open the Embed grid widget
Embedding Grid In Salesforce
3. Click Create Page. Please note that it might take up to a few minutes to create a page.

Salesforce Embed Grid

4. Copy the page name once it's created. We'll need it later. After that, you can close the widget.
Embedding Grid In Salesforce
Step 2: Incorporate the page into the detail view.

Edit the page layout that you would like to incorporate this grid into. Drag a new section onto the page layout. Then, click on the Visualforce Pages left nav item in the top area, and drag the Visualforce page you created in Step 2 into the new section. Click on the properties wrench, set the width to 100% and the height to 525. Click OK, then save the page layout.

The next time you load a record detail page for this object, you will see the GridBuddy related lists appear where you placed them on the page layout.

Why Do I Need to Write Visualforce to Incorporate a Grid Into My Record Detail Page?

GridBuddy is written in Visualforce using custom controllers. We do this to make our Grids completely dynamic. Unfortunately, Salesforce only allows Visualforce pages with the standardController of the same object as the record detail page to show up in the page layout editor. The methods outlined above allow you to use simple Visualforce to overcome this Salesforce limitation.

Please note: Salesforce Community pages require a different syntax. If you are working with Communities, do not use the Embed Grid feature. You will need to manually create your Visualforce page. Below is a code example of the syntax for embedding in Community pages.

<!-- Note this Visualforce page must have the same object in the standardController
parameter as the object type of the detail page. Replace "Related Account Objects"
with the name of your grid.
If you are using GridBuddy Free, replace "gblite__grid" with "gbfree__grid".-->
<apex:page standardController="Account" sidebar="false" showHeader="false">
  <apex:variable var="gridURL" value="{!URLFOR($Page.GBLite__Grid, Account.Id, [gname="Accounts with Related Objects", id=Account.Id, sh="0", ssb="0", sbb="1"])}"/>
  <iframe id="gridFrame" scrolling="auto" height="480" width="100%" frameborder="0"

Next Up: Learn how to edit a 3 object hierarchy on the one page using GridBuddy

Want to give GridBuddy a try for yourself and don’t have it installed yet? Install 14-day cost-free/risk-free trial of GridBuddy Unlimited from the AppExchange now!

Try GridBuddy for FREE


Subscribe To The AppBuddy Blog

Or Leave A Comment


Stay Connected

Related Posts

Popular Posts

New Call-to-action