Skip to main content

Return to TX Community

Liaison

Configuring Cover Sheets

Overview

Cover sheets can be configured for Essays, Extracurricular, Recommendations and Enrollment History components. These can be useful to set some context for your reviewers. In addition, cover sheets will display the relevant information for records that do not include an attachment (e.g., an essay typed into a text field, recommendation information typed into a recommendation form, etc.). For example, a cover sheet for an Essay might include 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 following steps will detail how to create custom Cover Sheets that can be included in the Application PDF for Application reviewers. In the following example, you’ll create a custom cover sheet for the Test object, available in 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. In this example, we will be using the Test object.
  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 page. 
  4. Copy and paste the following code, then make changes to the portions of the code marked in bold as appropriate. (Use the view source icon at the top right to copy the code.)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.

 

Select the Custom Cover Sheet in the Doc Definition window

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?