Interface UserActionExecutionRequest.Builder
- Enclosing interface:
- UserActionExecutionRequest
public static interface UserActionExecutionRequest.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Validates and retrieves a completedUserActionExecutionRequest
.withObjectName
(String objectName) Required: sets the object name for the user actionwithObjectRecordId
(String objectRecordId) Required: sets the ID value of the object record to execute the action onwithStartWorkflowInputParameters
(String key, Object value) Optional: for a Run Workflow user action, sets the input parameter key and value to start the workflow.withUserActionName
(String userActionName) Required: sets the fully qualified name value of the user action.withUserInputRecordId
(String userInputRecordId) Optional: for a RecordAction configured as a user action, sets the record ID for the user_input_object.
-
Method Details
-
withUserActionName
Required: sets the fully qualified name value of the user action.- Parameters:
userActionName
- the fully qualified name of the user action- Returns:
- this
UserActionExecutionRequest.Builder
-
withObjectName
Required: sets the object name for the user action- Parameters:
objectName
- the object name- Returns:
- this
UserActionExecutionRequest.Builder
-
withObjectRecordId
Required: sets the ID value of the object record to execute the action on- Parameters:
objectRecordId
- the object record's ID value- Returns:
- this
UserActionExecutionRequest.Builder
-
withUserInputRecordId
Optional: for a RecordAction configured as a user action, sets the record ID for the user_input_object.- Parameters:
userInputRecordId
- record ID for the user_input_object- Returns:
- this
UserActionExecutionRequest.Builder
-
withStartWorkflowInputParameters
Optional: for a Run Workflow user action, sets the input parameter key and value to start the workflow. This can be used to set multiple keys with different values. For example, {number_field__c, 123}- Parameters:
key
- key for the parameter. Cannot be null.value
- value for the parameter. Type must match the type of the parameter specified by the key.- Returns:
- this
UserActionExecutionRequest.Builder
-
build
UserActionExecutionRequest build()Validates and retrieves a completedUserActionExecutionRequest
. All required values must be provided.- Returns:
- the
UserActionExecutionRequest
- Throws:
RuntimeException
- if any of the required values are not provided.
-