Skip to main content

executeConnection()

Last updated 18/09/2024

The

executeConnection()
is a function on the
Five
object that allows calling a pre-configured connection in your application.

The

executeConnection()
allows calling pre-configured connections, and any of the pre-configured methods associated to the connection. You pass in the data source ID of the connection you want to execute and which method you need to be executed.

OData Extensions Using the Options

  • For
    LIST
    method, the option
    dataFilter
    can contain any valid OData filters.
  • For
    READ
    method, the option
    key
    needs to supply the key of an individual record.
  • For
    CREATE
    method, the option
    record
    needs to supply a new Object map containing the data for a new record.
  • For
    UPDATE
    method, the option
    record
    and option
    key
    needs to supply the relative information to update a record on the OData server.
  • For
    DELETE
    method, the option
    key
    needs to contain the key of the record to delete.
Available

Server

Function Signature
executeConnection(dataSourceID: string, method: string, options: ConnectionContext) : ConnectionResult

ParameterTypeDescription
dataSourceID
stringConnection data source ID
method
stringConnection method
options
ConnectionContextAdditional context for the method being called

Return Value

Returns a

ConnectionResult
object.

Examples

executeConnection()