Skip to main content

Command Palette

Search for a command to run...

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

Updated
3 min read
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

One Action is automatically created

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

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"

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

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

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.

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.

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

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.

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

So, let's see the result:

The menu and actions are available at row level:

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

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

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

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