Skip to main content

executeFunction()

Last updated 11/09/2024

executeFunction()

The

executeFunction()
is a function that executes a function on the server. You can call
executeFunction()
from the frontend to execute a function on the backend. To specify which function to call you can either supply the function ID or the function key, both are not required.

The

file
parameter 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
parameter called
UploadedFile
.

Available

Client

Function Signature
executeFunction(
functionID: string,
variables: Map<string, any>,
file: File,
actionKey: string, //Deprecated, not used
functionKey: string,
[ onResultsCallBack: (results: any) => void) : void ])

ParameterTypeDefaultDescription
functionID
stringempty stringFunction ID to execute, required if no function key is supplied.
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
stringempty stringDeprecated, not used
functionKey
stringempty stringFunction key to execute, required if no function ID is supplied
onResultsCallBack
function
null
Callback function on completion of execution of the backend function

Examples

executeFunction()