APEX Confirm Message With
Custom Event Dynamic Action

Video Tutorial

Purpose

In this tutorial you will learn how to fire a Dynamic Action (You can call procedure, perform update/insert or anything) after user clicks “OK” button  on APEX Confirm Message.

Step 1

1) Create a Dynamic Action to perform DML or call procedure

1) Identification
Name: <Any Name>

2) When
Event: Custom
Custom Event: InsertRecord
Selection Type: JavaScript Expression
JavaScript Expression: document

Add True Action

1)Identification


Action: Execute PL/SQL Code

2) Settings
PL/SQL Code: <Your Code>

Add Another True Action to Submit Page

1)Identification


Action: Submit Page

2) Settings

Show Preocessing: True

Step 2

4) Create on Button Click Dynamic Action

Create a Dynamic Action to execute after report refresh

 

1) Identification

Name: Confirm Message

 

2) When

Event: Click

Selection Type: Button

Button: P3_INSERT <Your Choice>

Add True Action

1)Identification
Action: Execute JavaScript Code

2) Settings
Code: apex.message.confirm(“Are you sure you want to perfrm this action?”, function(okPressed) {

        if (okPressed) {

 //Use this code to trigger custom event

            $.event.trigger(“InsertRecord”);

        }

    })

(adsbygoogle = window.adsbygoogle || []).push({});

1 thought on “APEX Confirm Message With Custom Event Dynamic Action”

  1. carlos benavides

    hello.
    In case on INSERT fail and raise any exception.
    How en client side caller: $.event.trigger(“InsertRecord”);
    could be manage the error for nice presentation message ?

Leave a Comment

Your email address will not be published. Required fields are marked *