Tuesday, April 11, 2017

Auto-dismiss APEX Universal theme success messages

In the APEX 5.1.1 Universal Theme demonstration application, a code snippet is included showing how to automatically dismiss Success messages via JavaScript using the apex.theme42.configureSuccessMessages API.
Trouble is it only works in some circumstances, as can be seen in screenshot from a demonstration application below.

You can try the demo application to observe the issue, and a solution that works right now. You can download the application, which probably works on earlier versions of the Universal theme - I haven't tested it.


Stew said...

For those of us who can't upgrade to 5.1.1 in the near future, is there any chance this snippet could be applied to existing applications in, say version 5.0.4?
Or does someone have an add-on script that would implement this?



michael.b said...

@Stew: I created a dynamic action to do that in Apex 5.0
Event: Page Load
Action: Execute JavaScript Code

To auto-dismiss not only success messages but the error message region as well you can use

Pradeep Singh said...
This comment has been removed by a blog administrator.
Jason Borne said...
This comment has been removed by a blog administrator.
Mathias Reisberger said...

The Close Success Message Button (X) isn't working anymore?
When clicking the Button the Success Msesage won't hide.