CSV Templates


CSV templates allow you to merge data from Salesforce into CSV files. They are built with the S-Docs Template Editor in Salesforce.

Main Advantages

CSV templates are simple to build; one line is used for comma-separated column headers, while related list field queries are input below.

Supported Features

Feature Supported?
Merge Fields
Related Lists
Conditional Logic
Live Edit
Runtime Prompts
HTML/CSS Source Editing
Named Queries
Template Header & Footer
Insert Component Templates
Mass Merge (Batch Generation)
Collect e-signatures with S-Sign

Recommended For

CSV templates are recommended for data output that will be used across multiple spreadsheet programs, since CSV files are supported across most data upload interfaces.

Main Limitations

Consider the following CSV template limitations:

  • Only one sheet is supported per template; multiple sheets are not supported
  • The Insert Related List button should not be used to build your related list due to the extra table styling it provides, which is not compatible with CSV

Special Requirements

  • Use <class>none</class> to remove related list table styling
  • You can optionally input comma-delimited column headers before your related list begins (see line 1 in the example below)
  • Use <br /> to insert line breaks outside of related lists
  • Use the postfix column attribute to add commas between values and line breaks between records within your related list (see example below)
  • Values with commas must be enclosed in quotation marks to emulate a string. Use the prefix and postfix column attributes to add quotation marks to fields that output values with commas (see line 5 in the example below)

Example LineItems related list:

quantity,listprice<br />
  <column prefix='"' postfix='",'>quantity</column>
  <column postfix=",">listprice</column>
  <column postfix="<br />">totalprice</column>

Example LineItemsSOQL related list:

Name,Stage Name,Created Date<br />
<!--{{! <lineitemsSOQL>
<soql> SELECT name,stagename, createddate FROM Opportunity</soql>
<column prefix='"' postfix='",'>name</column> 
<column postfix=",">stagename</column>
<column postfix="<br />">createddate</column>
</lineitemsSOQL> }}-->

Tags: ,

Was this helpful?