PromptAndExecuteAction
Asks a yes/no question and executes a quick action depending on the answer.
Syntax
PromptAndExecuteAction(objectRef, prompt, yesAction, noAction)
Enabled For
For a description of the business object categories, see Notes on "Enabled For".
Business Object Category | Yes/No |
|---|---|
Business Rules: Before-Save Rules | No |
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) | Yes |
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) | Yes1 |
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) | Yes |
Business Rules: Editing Rules | Yes2 |
Business Rules: Initialization Rules | Yes1 |
Business Rules: Read Only Rules | No |
Business Rules: Required Rules | No |
Business Rules: Validation Rules | No |
Client Expressions | No |
Object Permissions | No |
Services | Yes |
LDAP | Yes |
Mobile | Yes |
Quick Actions (except UI Quick Actions) | Yes1 |
UI Quick Actions | No |
Reports | Yes1 |
Search/Dashboard without field references | Yes1 |
Search/Dashboard with field references | No |
| |
Parameters
Parameter | Description |
|---|---|
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. 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. If more than one quick action with this name exists tenant-wide, the function call fails. |
Return Value
Boolean value. Returns true or false if there is no such business object.
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'))
