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.
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 Label, Field 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 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:
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.