Newer Version Available

This content describes an older version of this product. View Latest

FunctionInvocationRequest (Beta)

Represents invocation information for a Salesforce Function. This object is available in API version 51.0 and later.

As a beta feature, Salesforce Functions is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for Salesforce Functions in the Salesforce Functions Trailblazer Community. For information on enabling this feature in your org, contact Salesforce.

Note

When a Salesforce Function is invoked using the Apex functions.Function invoke methods, a FunctionInvocationRequest record is created that contains information on the status and results of the invocation.

Supported Calls

delete(), describeSObjects(), getDeleted(), getUpdated(), query(), undelete(), update()

Fields

Field Details
ExecutionTime
Type
int
Properties
Filter, Group, Nillable, Sort, Update
Description
The execution time of the Function in milliseconds.
ExtendedResponse
Type
textarea
Properties
Nillable, Update
Description
JSON object with additional information about the result of the Function execution.
FunctionName
Type
string
Properties
Filter, Group, idLookup, Sort
Description
Name of the Function that was invoked.
OwnerId
Type
reference
Properties
Filter, Group, Sort, Update
Description
The owner of the FunctionInvocationRequest.
ResponseBody
Type
base64
Properties
Nillable, Update
Description
Response body of the invoked Function.
ResponseContentType
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Content type of the response body of the invoked Function. For example, the content type could be application/json, text/csv, or various other values depending on what the Function returned.
ResponseLength
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Length of the response body.
ResponseName
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
Name of response, not currently used.
ResponseUncompressedLength
Type
int
Properties
Filter, Group, Nillable, Sort, Update
Description
Uncompressed length of the Function response, if the response content was compressed.
StackTrace
Type
textarea
Properties
Nillable, Update
Description
If there was an error invoking the function, this field contains the Function stack trace.
Status
Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
Status of the invoked Function. Functions that are invoked asynchronously can be in a queued InProgress state before they are invoked.
Possible values are:
  • Dispatched
  • Error
  • InProgress
  • New
  • RemoteConsumed
  • RemoteProduced
  • Success

Usage

Treat FunctionInvocationRequest records as read-only records used to get information about a specific Function invocation. To invoke Functions, use the Apex functions.Function class invoke methods.