Skip to main content

Return to TX Community

Liaison

Configuring Cover Sheets

Overview

Cover sheets can be set up for components such as Essays, Extracurriculars, Recommendations, and Enrollment History to provide helpful context for reviewers. They are especially useful when a record doesn’t include an attachment—for instance, if an essay is entered directly into a text field or a recommendation is submitted through a form. A cover sheet for an Essay, for example, might display the Title, Topic, and Student Name.

  1. Go to Setup and select Object Manager.
  2. Search for the custom object for which you want a Cover Sheet. For example, Essay (TargetX_SRMb__Essay__c).
  3. Click the object and navigate to Field Sets.
  4. Click Edit for the Essay Cover Sheet
  5. Drag new fields into the Field Set or remove any fields as needed.

Creating Custom Cover Sheets using Visualforce Pages

The steps below outline how to create custom Cover Sheets that can be included in the Application PDF for reviewers. In this example, you'll create a custom Cover Sheet for the Test object, which is part of the TargetX Recruitment Manager package.

Create a FieldSet

The Application Review Tool uses Salesforce FieldSets in cover sheets to make it easier to add and remove fields on the cover sheet.

  1. Go to Setup and select Object Manager. We will use the Test object in this example.
  2. Go to the Field Sets related list:
  3. Click New and set the following fields:
    • Field Set Label
    • Field Set Name
    • Where is this used?
  4. Click Save and add fields to fieldset.
  5. Save and now your Field Set is ready for use.

Create a custom Visualforce Page

  1. From Setup and search for Visualforce Pages.
  2. Select New.
  3. Set a Name and Label for the page. 
  4. Copy and paste the following code, then make changes to the portions of the code marked in bold as appropriate. 
    • Or you can download the code here:
<apex:page standardController="<<insert the api name of object>>" showHeader="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false">
    <head>
        <style type="text/css">
            @page {
                margin-top: 100px;
                margin-bottom: 100px;
            }
        </style>
    </head>
    <body>
        <div>
            <h2><<insert some title>></h2>
            <table width="100%" cellpadding="5px" cellspacing="5px">
                <tbody>
                    <apex:repeat value="{!$ObjectType.<<insert the api name of object>>.FieldSets.<<insert field set name>>}" var="field">
                    <tr>
                        <td><b>{!field.label}</b></td>
                    </tr>
                        <tr>
                            <td><apex:outputtext style="white-space:pre-wrap;font-family:Helvetica, Arial Unicode MS, sans-serif;"" value="{!<<insert the api name of object>>[field.fieldPath]}"/></td>
                        </tr>
                    </apex:repeat>
                </tbody>
            </table>
        </div>
    </body>
</apex:page>
 
As per our example, it becomes:
<apex:page standardController=" TargetX_SRMb__Test__c" showHeader="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false">
    <head>
        <style type="text/css">
            @page {
                margin-top: 100px;
                margin-bottom: 100px;
            }
        </style>
    </head>
    <body>
        <div>
            <h2> Test (GRE)</h2>
            <table width="100%" cellpadding="5px" cellspacing="5px">
                <tbody>
                    <apex:repeat value="{!$ObjectType. TargetX_SRMb__Test__c.FieldSets. GRE_Cover_Sheet}" var="field">
                    <tr>
                        <td><b>{!field.label}</b></td>
                    </tr>
                        <tr>
                            <td><apex:outputtext style="white-space:pre-wrap;font-family:Helvetica, Arial Unicode MS, sans-serif;" value="{!TargetX_SRMb__Test__c[field.fieldPath]}"/></td>
                        </tr>
                    </apex:repeat>
                </tbody>
            </table>
        </div>
    </body>
</apex:page>
  1. Save, and your visualforce page is ready to use.
  2. You can update the 'Date Format' if you want dates displayed as MM/DD/YYYY.
  3. Select the Custom Cover Sheet in the Doc Definition window.
  4. Save and continue.

Rendering line breaks in your Custom Coversheet

  1. Navigate to Setup and search for Visualforce Pages.
  2. Locate your custom cover sheet and select Edit.
  3. Replace the following:

<td>{!TargetX_SRMb__Recommendation__c[field.fieldPath]}<td/>

  With

<apex:outputtext style="white-space:pre-wrap;font-family:Helvetica, Arial Unicode MS, sans-serif;" value="{!<<insert the api name of object>>[field.fieldPath]}"/>
    1. Save your changes.

    Updating the 'Date Format' in your Custom Coversheet

    1. Navigate to Setup and search for Visualforce Pages.
    2. Locate your Custom Coversheet and select Edit.
    3. In the Visualforce Markup tab, search for field.fieldpath for the object you want to update the date format:
    <apex: outputtext style "white-space:pre-wrap; font-family:Helvetica, Arial Unicode
    MS, sans-serif;" value " {!Target_SRMb_Enrollment_History_c[field.fieldPath]}"/>
    1. Replace that line with the following, replacing the field name as needed:
    <apex: outputtext style "white-space:pre-wrap; font-family:Helvetica, Arial Unicode
    MS, sans-serif;" value "{!IF (field. Type ='date , ' (0, date, MM/dd/yyyy) ', ' (0)') )" >
    {f <apex:param value-" (!Target_SRMb_Enrollment_History_c[field.fieldPath])" />})
    </apex: outputText>
    
    1. Save your changes.

     

    • Was this article helpful?