Reference > Expressions > Built-in Functions > System Functions > PromptAndExecuteAction

PromptAndExecuteAction

Asks a yes/no question and executes a quick action depending on the answer.

Syntax

PromptAndExecuteAction(objectRef, prompt, yesAction, noAction)

Enabled for

Search/Dashboard No
Business Rules No
Quick Actions Yes
Workflow Objects No
Reports No

Parameters

objectRef A reference to the business object instance to which the two quick actions apply.
prompt The text of the prompt. This should be a question that can be answered yes or no.
yesAction

The name of the quick action to execute if the answer is yes.

 

Note: If more than one quick action with this name exists tenant-wide, the function call fails.

noAction

The name of the quick action to execute if the answer is no.

Note: If more than one quick action with this name exists tenant-wide, the function call fails.

Return Value

Boolean value. Returns true, false, or an error.

Example

$$(PromptAndExecuteAction( '$(Parent(Incident#.Rev3))', 'Task belongs to an incident with no other unfinished tasks. Select [Yes] to set incident to resolved, select [No] to create a new task, or select [Cancel] to cancel the task and save the operation.', 'Resolve Incident', 'New TaskAssignment'))