APEX 5: Showing custom success message from Dynamic Action (DA) on Universal Theme

I needed to show a success message after ending a Dynamic Action and I wanted this message to be with the same format as success messages from page processes. Since this is not a standard feature of Oracle APEX, you can do the following trick if you’re using Universal Theme:

  1. Create a JavaScript function which replaces APEX_SUCCESS_MESSAGE region and makes it visible with a message parameter
  2. OPTIONAL: Create an APEX item to store your message (this is useful if you want to show dynamic messages)
  3. Call function created at step 1 via Dynamic Action passing the value of the item created at previous step

my_custom_success_message

1) Add the following code at HTML Header section

HTML_header_custom_func

2) Inform an APEX item with your message via Dynamic Action, for instance use “Set Value”:

MyCustomMessage_value

3) Create a JavaScript dynamic action which calls our show_succes_message function:

call_show_message

Likewise, you can create another JS function to inform APEX_ERROR_MESSAGE so that you can also show error messages.

Hope it helps!

No comments yet.

Leave a Reply

APEX 5: Showing custom success message from Dynamic Action (DA) on Universal Theme

I needed to show a success message after ending a Dynamic Action and I wanted this message to be with the same format as success messages from page processes. Since this is not a standard feature of Oracle APEX, you can do the following trick if you’re using Universal Theme:

  1. Create a JavaScript function which replaces APEX_SUCCESS_MESSAGE region and makes it visible with a message parameter
  2. OPTIONAL: Create an APEX item to store your message (this is useful if you want to show dynamic messages)
  3. Call function created at step 1 via Dynamic Action passing the value of the item created at previous step

 

my_custom_success_message

1) Add the following code at HTML Header section

HTML_header_custom_func

2) Inform an APEX item with your message via Dynamic Action, for instance use “Set Value”:

MyCustomMessage_value

3) Create a JavaScript dynamic action which calls our show_succes_message function:

call_show_message

Likewise, you can create another JS function to inform APEX_ERROR_MESSAGE so that you can also show error messages.

Hope it helps!

 

Tags: , , , , ,

No comments yet.

Leave a Reply