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

NameTypeRequiredDescription
exporterstringYes
objectNamestringYes
exportTemplatestringNo (default="default")
metastructNo
fieldTitlesstructNo
selectFieldsarrayNo
exportPagingSizenumericNo (default=1000)
recordsetDecoratoranyNo (default="")
exportFilterStringstringNo (default="")
exportFileNamestringNo (default="")
orderBystringNo (default="")
mimetypestringNo (default="")
templateConfigstructNo
historyExportIdstringNo (default="")
expandNestedFieldsbooleanNo (default=false)
loggeranyNo
progressanyNo