# APEX 26.1 New Features: Declarative Menu Buttons and Template Component Actions

This is a great combination for something the used to take some effort on writing some functions to execute actions on specific rows of an IR, like using a hidden page item, assigning the PK value of the row to that item and then execute a Dynamic Action submitting that hidden item.

There is now a direct way. In the IR column properties Under Identification -> Type, we can select Actions

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/75b8bc11-f2cf-4082-b481-e74600635f93.png align="center")

One Action is automatically created

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/e4be2be3-163d-4626-b054-88a3c941f0a4.png align="center")

I'm going to call it "Ticket Actions" and change the Template to "Menu", so I can include more actions.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/249f8baf-3a1a-4d0c-8649-e5e9b5998272.png align="center")

Now, we have the "Menus" under our new Action. I'm going to change the behavior to the new "Trigger Action" option, and rename the Menu entry as "Accept"

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/f66093dc-d419-4445-a11c-a288e787ed8c.png align="center")

A triggered Action is automatically created as "Execute Server-side Code" by default.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/5b276d87-b693-43ee-b002-88af9ee74af7.png align="center")

I'm going to create 3 more actions by right clicking "Triggered Actions", to simulate a typical flow. Confirm, Execute and display the result.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/cf52a34d-20a6-4834-aa2c-8ca6aa8749e7.png align="center")

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/53d6e73f-2c07-49e0-b6e0-df6206a616fd.png align="center")

There are some new things here. The first one is under Execute Server-side Code, where we have the option now to show the processing spinner. I'm going to include a name to identify the action, and notice under "Items to Submit" that the TICKET\_ID column is there.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/e0fc7066-dcff-4412-ace8-04dd65b85aa0.png align="center")

then we have the Show Success Message Action! this is a great new feature to simplify the way display these kind of messages, like using APEX\_ERROR package.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/ca70d75f-e7c4-4d22-8ecb-d9d76a4d5409.png align="center")

Under the Refresh action, we can see another new feature, the "Maintain Pagination" option is available now.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/267e0861-dac6-4a60-abae-4dad0db621ed.png align="center")

Now, by right clicking the Accept action, using the Duplicate option I'm creating a new action as a copy of the existing one, and change the "Accept" values to "In Progress" So I can set either of those status.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/46b1c534-4353-45c3-b905-bea41f88bc40.png align="center")

Finally, I'm including a server side condition so the current status of the ticket is not displayed as an action:

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/b76bd53b-fa2e-4266-af24-6ef7b2c2471e.png align="center")

So, let's see the result:

The menu and actions are available at row level:

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/0efad229-722a-4a89-bbc7-ea1882044564.png align="center")

I we use the Accept action, We'll get the the confirmation:

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/da94abf8-9072-4f55-a972-2d1b3641bc17.png align="center")

after clicking OK the Success message is displayed, and the report is updated.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/27beb761-858c-4728-bb12-47495d1e8f6c.png align="center")

And now, the "Accept" action is no longer available in the ticket with Accepted status.

![](https://cdn.hashnode.com/uploads/covers/6499b7e5318d636a22fc241e/1e78fffb-c0e7-44e1-b008-f5699a5596b8.png align="center")

Hope this is useful in your next projects and maybe upgrading some old ones to simplify them.
