executeFunction()
Last updated 6/06/2023
executeFunction()
The executeFunction()
is a function that executes a function on the server. You can call the executeFunction()
from the frontend to execute a function on the backend.
To specify which function to call you can either supply the name or the function key, both are not required.
The file
argument is a File
interface provided from the browser, if provided to the executeFunction()
the file will be available to the backend function on the context called
UploadedFile.
Available
Client
Function Signature
executeFunction(
name: string,
variables: Map<string, any>,
file: File,
actionKey: string, //Deprecated, not used
functionKey: string,
[ onResultsCallBack: (results: any) => void) : void ])
Parameter | Type | Default | Description |
---|---|---|---|
name | string | 'empty string' | Function ID to execute, required if no function key. |
variables | Map<string, any> | null | Map of variables to provide to the context of the function. |
file | File | null | Contents of a file to be sent to the backend. |
actionKey | string | 'empty string' | Deprecated, not used. |
functionKey | string | 'empty string' | Function key to execute, required if no name. |
onResultsCallBack | function | null | Callback function on completion of execution of the backend function. |