insertDataFromSelect()

Overview

public numeric function insertDataFromSelect(
      required string  objectName    
    , required struct  selectDataArgs
    , required array   fieldList     
    ,          boolean clearCaches    = Defaults to whether query caching is enabled or not for this object
)

Inserts records into a database based on a selectData() set of arguments and provided fieldlist.

Arguments

NameTypeRequiredDescription
objectNamestringYesName of the object in which to to insert records
selectDataArgsstructYesStruct of arguments that are valid to pass to the selectData() method
fieldListarrayYesArray of table field names that the select fields in the select statement should map to for the insert
clearCachesbooleanNo (default=Defaults to whether query caching is enabled or not for this object)Whether or not to clear caches related to the object whose record you are creating