exportData()
Overview
public any function exportData(
required string exporter
, required string objectName
, string exportTemplate = "default"
, struct meta
, struct fieldTitles
, array selectFields
, numeric exportPagingSize = 1000
, any recordsetDecorator = ""
, string exportFilterString = ""
, string exportFileName = ""
, string orderBy = ""
, string mimetype = ""
, struct templateConfig
, string historyExportId = ""
, boolean expandNestedFields = false
, any logger
, any progress
)
Returns export filepath for the given exporter and arguments. exporter.hint ID of the exporter to use (i.e. csv, excel, etc.) objectName.hint Name of the object from which the data is to be exported meta.hint Abitrary struct of data that an exporter may use to decorate the export document (e.g. could contain author, timestamp, etc.) fieldTitles.hint Struct of field titles where keys are raw field names and values are translated titles for columns selectFields.hint Array of select fields that will be selected against the object exportPagingSize.hint Number of records to fetch at a time during the export build process. Default is 1000. recordsetDecorator.hint Closure that accepts a single 'recordset' argument that can be used to add columns to the recordset. Useful when a single query is not enough to populate the export data.
Arguments
Name | Type | Required | Description |
---|---|---|---|
exporter | string | Yes | |
objectName | string | Yes | |
exportTemplate | string | No (default="default") | |
meta | struct | No | |
fieldTitles | struct | No | |
selectFields | array | No | |
exportPagingSize | numeric | No (default=1000) | |
recordsetDecorator | any | No (default="") | |
exportFilterString | string | No (default="") | |
exportFileName | string | No (default="") | |
orderBy | string | No (default="") | |
mimetype | string | No (default="") | |
templateConfig | struct | No | |
historyExportId | string | No (default="") | |
expandNestedFields | boolean | No (default=false) | |
logger | any | No | |
progress | any | No |