PDF Generator

This section describes PDF Tables. PDF Tables are used to display related list fields and data, e.g., in case of Quote it can show Quote Line Items details, for Opportunity it can show Opportunity Products details.

Note: If you don’t want to show related list items as tables in PDF, please do not configure any tables.

One PDF Table in PDF template corresponds to one table in PDF. PDF Table consists of PDF Columns which correspond to individual columns in PDF.

Let’s check configuration options in more details.

PDF TABLE DETAIL


If you have cloned pre-defined templates, you will get pre-configured tables and columns or you can create new tables and columns as per your need. Here are the fields for configuring the tables –

Title: This is displayed on top of the table as header & you can have headers like products, services etc.

Object Name: Select related Object name from which data is pulled from. E.g., QuoteLineItem, OpportunityLineItem, OrderItem for Standard Quote, Opportunity and Order Objects. It can be any other Custom object as well which is related to object selected in Object field in Overall Style tab.

QuoteLineItem, OpportunityLineItem & OrderItem are selected by default for standard Quote, Opportunity and Order Objects respectively.

Field Name: Select Object Field name which has relationship with parent object. E.g. QuoteId, OpportunityId, OrderId for Standard Quote, Opportunity and Order Objects. In case of Custom object, it will be a custom relationship field API name.

QuoteId, OpportunityId & OrderId are selected by default for standard Quote, Opportunity and Order Objects respectively.

Formula: This is used to group related list items in the PDF table by any custom or standard field. If no grouping required, keep this field blank and in that case all related list items will be displayed in the corresponding table. Primary use of this feature is to provide more clarity on cost breakups in a quote/invoice/contract/PO

Here are some examples of Formula:

For Quote Line Item having lookup relationship to standard Product object:

Product2.Family=’Services’  – groups all line items having Product family = ‘Services’

For Quote Line Item having lookup relationship to standard Product object & having a custom field :

(Custom_Field__c=” AND  Product2.Family LIKE ‘%Subscription%’)   – groups all line items where Custom_Field__c field is blank and Product family contains Subscription

Sort Column: Field API name to sort the table by. For example SortOrder for Quote. Defaults to CreatedDate if none provided.

Sort Order: Sorts table either by Ascending or Descending order. Defaults to Ascending if none provided.

Display on New Page: When selected, this Table will be shown in next/new page always.

Show aggregate fields outside the table: When selected it will show Aggregate (like Sum, Average etc.) for PDF Columns after the table as separate line. In this case Aggregate LabelField Type and Aggregate Type should be mentioned in PDF Column as described below.

Title Style :

You can hide table title or change style by using following options –

Hide Title: When selected, it will hide the Title from the table.

Background Color, Title Align, Font Size and Font Color: These fields control the styling of Title/Header of the table

Additional Info:

It’s WYSWIG editor and content of this field are displayed below the table & are tied to this table so if due to any reason table is not displayed content of this sections are not displayed as well. It is useful to have notes or pricing details specific to the table above.

Bundle View Configuration:

This section is visible only when our other Appexchange App CPQ/Product Bundle is installed in your org and you have access to it. These configurations are useful when you want to group items based on the Bundles & have Bundle level summary instead of individual line item summary. Please check this section for more details on how to configure it tables with bundle summary.

PDF COLUMNS


PDF Columns need to defined for the fields to be displayed from related object as columns of the table in PDF. Please note, table will not be displayed unless there is a column defined.

Following are the PDF Column field details –

Choose Field : Every column corresponds to a field in related list object so we need to choose field corresponding to this column e.g., any standard field like Description, Quantity, SubTotal, Discount, TotalPrice etc. can be specified for QuoteLineItem related list or any custom fields can also be chosen.

Also, fields from related objects can also be chosen like product is having a lookup relationship with QuoteLineItem so any field from Product can be chosen as well.

You can also combine multiple field values in single PDF column and to do that use custom formula field to combine values of fields and use that choose that field formula field in the column e.g., to display product name and description from QuoteLineItem as single PDF column build a custom formula field on QuoteLineItem with this formula pricebookentry.Product2.Name & pricebookentry.Product2.Description or pricebookentry.Product2.Name & br() & pricebookentry.Product2.Description and choose that customer field.

Label : This will be automatically filled from the field name. You can modify as well.

Width: Column width in %. Please do not append %. As much as possible total of all columns width should be 100%

Group By: When it’s checked, table rows inside the table are grouped based on this column. For example, if API Name for a column is specified as PricebookEntry.Product2.ProductCode & if Group By checkbox is checked for this column, all rows will be grouped by ProductCode. This provides one more level of grouping inside the table.

Header Style: Fields in this section define column header text alignment, background color, text color and weight.

Column Style: Fields in this section define column text alignment, background color, text color and weight.

Aggregate Style:

Fields in this section define aggregate value text alignment, background color, text color and weight which is shown at the end of the table.

Aggregate Label: Label for the Aggregate value at the end of the table.

Aggregate Type: Defines the aggregation like Sum, Min, Max, Avg or Append for that column.

If Show aggregate fields outside the table checkbox is not selected in PDF Table configuration as explained above, aggregates will be shown as last row in the Table.

Notes:

  1. If related list details are not needed in PDF as table, no need to configure PDF Table
  2. If there are no items in related list or if none of the related list records are matching formula criteria, that table will be hidden in the PDF
  3. For showing images as columns, please check this tutorial – https://gocloudz.com/documentations/working-with-images/
  4. If any Line item is not supposed to be shown in the table in PDF, check “Do Not Show on PDF” Checkbox on Line Item level. In this case aggregation will happen only for the rows shown in the PDF
  5. If for any column, all values are blank, it will be automatically hidden but that’s not true for having column value as “0” (zero).  If you want to enforce hiding the column if values in row(s) is “0”, you can select “Hide columns if value 0” checkbox under PDF Settings >> General Settings >> Default Settings as shown in the below screen shot.

HIGHLIGHT NEGATIVE VALUES


You can highlight negative values (number, percent, and currency fields) using custom color. For example, display all negative values in “Red”.

Go to PDF Settings tab >> General Settings >> Default Settings >> Enter the color code in “Highlight negative values” field

Note: This is a global setting. Once configured, all negative values on all Tables and Columns will be displayed using the color code specified.