# togglePalettes() equivalent in UXP?

**URL:** <https://forums.creativeclouddeveloper.com/t/togglepalettes-equivalent-in-uxp/3694>\
**Category:** UXP Plugin API\
**Created:** [October 2, 2021, 6:45am UTC](https://forums.creativeclouddeveloper.com/t/togglepalettes-equivalent-in-uxp/3694 "2021-10-02T06:45:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [May 22, 2025, 2:49pm UTC](https://forums.creativeclouddeveloper.com/t/togglepalettes-equivalent-in-uxp/3694/5 "2025-05-22T14:49:02Z")

</div>

This feature was removed for 3rd party. But I don’t know why, because I don’t there is reason to block it.

In ExtendScript the underlying action manager code is

```JS
executeAction(stringIDToTypeID("togglePalettes"))

```

In UXP it would translate as:

```JS
const {executeAsModal} = require("photoshop").core;
const {batchPlay} = require("photoshop").action;

async function actionCommands() {
   const result = await batchPlay(
      [
         {
            _obj: "togglePalettes",
            _options: {
               dialogOptions: "display"
            }
         }
      ],
      {}
   );
}

async function runModalFunction() {
   await executeAsModal(actionCommands, {"commandName": "Action Commands"});
}

await runModalFunction();

```

…and it does not work.

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/togglepalettes-equivalent-in-uxp/3694)._
