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 LISTmethod, the optiondataFiltercan contain any valid OData filters.
- For READmethod, the optionkeyneeds to supply the key of an individual record.
- For CREATEmethod, the optionrecordneeds to supply a new Object map containing the data for a new record.
- For UPDATEmethod, the optionrecordand optionkeyneeds to supply the relative information to update a record on the OData server.
- For DELETEmethod, the optionkeyneeds to contain the key of the record to delete.
Server
Function Signature
executeConnection(dataSourceID: string, method: string, options: ConnectionContext) : ConnectionResult
Parameter | Type | Description |
---|---|---|
dataSourceID | string | Connection data source ID |
method | string | Connection method |
options | ConnectionContext | Additional context for the method being called |
Return Value
Returns a
ConnectionResult
object.