Actions can be added to your grids to incorporate additional Salesforce functions, such as ‘Chatter’ or ‘Send email’. All GridBuddy Connect Actions must point to a URL. In this example, we will add “chatter” to a Contact grid.
- Create a Visualforce page for the action you want to create.
- Modify the below Visualforce code to change the ‘standardController’ to the object of your choice (example: Opportunity, Account, or whatever the object is to which you’d like to add chatter)
- Modify the ‘entityId’ to the object of your choice (example: Opportunity.Id, Account.Id, or whatever the object is to which you’d like to add chatter)
- Do not modify any of the other code.
- Click “save”
<apex:page standardController="Contact" sidebar="false" showHeader="false">
<style>
.feedcontainer {padding-left:10px;}
.publishercontainer {padding-left: 10px;}
</style>
<chatter:feed entityId="{!Contact.Id}"/></apex:page>
- Click “preview” to preview your Visualforce code
- Copy the ‘Preview’ URL. It should look something like this: https://soleng--c.visualforce.com/apex/LeadChatter
- In the GridBuddy Connect Wizard, click ‘manage actions’ and click ‘create new action’ to create a new action
- Name the action “contact-chatter” - or something that tells you exactly what this action does
- Select “single record” - this will add the action to the three vertical to the left of each grid record
- Select the datasource for this action. Only grids from this same datasource will have access to this action
- Select the object “Contact” - only grids built from the Contact object will have access to this action
- Select the display behavior “window overlay”
- Select the URL Content Source
- In the Content field, paste the preview URL that you copied in step 2
- The ID Parameter will be “id”
- Click ‘save’
- In the GridBuddy Connect Wizard, click ‘manage grids’. Select the Contact grid to which you’d like to add this action.
- Remember that since we selected ‘contact’ as the Action’s object, it will only function on a Contact grid from the same datasource. Also keep in mind that the Visualforce page we created shows ‘contact’ as the standardController, and ‘Contact.Id’ as the entityId, so this action will only work for Contacts.
- In your Contact grid, go to step 2 of the Wizard and scroll to the bottom of the page. You will see a list of all actions in this datasource
- Check the box beside the actions that align with this grid—In this case, Contact object actions.
- Click ‘save’
- Open the grid by clicking the grid name at the top-right of the wizard, or by selecting it from the GridBuddy Connect Grids dropdown menu
- Click the three vertical dots to the left of any record on the grid
- You will see your actions available here.
- Click the Contact-Chatter action to open Salesforce chatter for this contact.