# Javascript: TXTextControl.getUndoActionName Method

> Gets a string that represents the name of the action that will be performed when a call to the undo method is made. The property's value is null if there is no action that can be undone.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getUndoActionName Method
- **366 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getundoactionname-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getundoactionname-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getundoactionname-method/llms-full.txt

---

### Description

Gets a string that represents the name of the action that will be performed when a call to the [undo](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/undo-method/llms-full.txt) method is made. The property's value is null if there is no action that can be undone.

### Syntax

```javascript
<void> TXTextControl.getUndoActionName(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | The callback function that receives the requested value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.getUndoActionName` in a practical document-editing workflow. It gets a string that represents the name of the action that will be performed when a call to the undo method is made. The property's value is null if there is no action that can be undone.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.getUndoActionName(
    function(result) {
        console.log("get undo action name result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getTextParts Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettextparts-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getUserNames Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getusernames-method/llms-full.txt)
