Show Current Object Details in a Reading Pane Tab
Warning:
Warning
Due to the ever-changing complex nature of programming languages, Conga does not support Visualforce or any elements related to APEX.The following figure shows an example of Account Details:
Create a Field Set
First, create a field set that contains the details you want to review in the Reading Pane.
- In Salesforce, click Setup.
- Click Customize and click the object of interest.
- Click Field Sets. The object Field Sets page appears.
- Click New.
- Enter a Field Set Label and Field Set Name. Write down the Field Set Label for later use.
-
In the Where is this used? box, provide a brief description of where and how the field set will be used. This information helps administrators determine how to populate the installed field set with their own fields. For example:
- Click Save.
-
Add fields to the field set. You can copy a current page layout by viewing it and choosing the fields that match. Or, create your own field set.
- Click Save.
Create a Visualforce Page for the Object Details
- In Salesforce, click Setup.
- Click Develop and click Visualforce Pages.
- Click New.
-
Enter a Name and Label using the following convention (where "RP" stands for Reading Pane):
- Label: AG_Object_RPTab (for example, AG_Account_RPTab)
- Name: Object_Details (for example, Account_Details)
-
Paste the following code in the Visualforce Markup space. Replace Visualforce Markup space. Replace <Object> with the label of the current object (for example, Account). Replace <Field_Set> with the field set label that you recorded in Step 4 of the Create a Field Set section.
<apex:page standardController="<Object>" showHeader="false" docType="html-4.01-strict"> <style> select.fullWidth{ width:200px } </style> <div> <apex:form id="refresh" > <apex:messages /> <apex:pageBlock id="editBlock" html-style="display:none"> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!quickSave}" rerender="refresh"/> <apex:commandButton onclick="location.reload()" value="Cancel" rerender="refresh"/> </apex:pageBlockButtons> <apex:pageBlockSection columns="2"> <apex:repeat value="{!$ObjectType.<Object>.FieldSets.<Field_Set>}" var="field"> <apex:inputField value="{!<Object>[field]}" styleClass="fullWidth" /> </apex:repeat> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock id="viewBlock"> <apex:pageBlockButtons > <apex:commandButton onclick="document.getElementById('{!$Component.editBlock}').parentElement.parentElement.parentElement.style.display = ''; document.getElementById('{!$Component.viewBlock}').style.display = 'none'; return false " value="Edit" /> </apex:pageBlockButtons> <apex:pageBlockSection columns="2"> <apex:repeat value="{!$ObjectType.<Object>.FieldSets.<Field_Set>}" var="field"> <apex:outputField value="{!<Object>[field]}" styleClass="fullWidth" /> </apex:repeat> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </div> </apex:page>
- Click Save.
Load the Visualforce Page as a Reading Pane Tab
- Click Grid Explorer.
- Select the object for which you created the Visualforce page.
- Click Reading Pane.
- In the row of tabs at the top of the Reading Pane, click the tab with the plus sign. This tab is at the end of the list; you may need to scroll through the tabs using the arrow icon.
- Click the Reading Pane drop-down list.
- Click the Visualforce Pages drop-down list.
-
Select the check box next to the name of your Visualforce page, for example:
- Click Save in the Grid toolbar. This saves your reading pane tabs so they will be available in a future session.