---
title: PromptAndExecuteAction
slug: neurons-for-itsm/admin-user-help/enu/latest/promptandexecuteaction
createdAt: 2026-07-14T19:16:47.031Z
---

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"](docId\:u26v9feCFs6iLwA0-PVJd).

| 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     |
| 1. Except in services.<br />2. Except in services and when this field appears on a form or is triggered by such a field. |        |

## 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.<br />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.<br />If more than one quick action with this name exists tenant-wide, the function call fails.  |

## Return Value

:::Paragraph{indent="1"}
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'))`
