A Single Dynamic Action to Refresh Multiple Reports
Normally, if you want to refresh a report after a Modal Dialog closes you would create a “Dialog Closed” Dynamic Action (DA), and the True action would be Refresh selection the Report.
However, recently I had a very interesting situation where a page had many reports that could open a dialog. Let’s just call it dozens of reports for the sake of argument.
In this situation, instead of creating a single DA per report, what if we could have one single DA that would “listen” for change on ALL “Dialog Closed” events.
To accomplish this, instead of selecting a specific report you can use a jQuery Selector that represents all your regions, for example, those with the class “t-Region”.
Then the True action can use the this.triggeringElement
set by the DA and call apexrefresh
to refresh the region that just had a dialog closed:
$(this.triggeringElement).trigger("apexrefresh");
Excellent Jorge!! Thank you for sharing!!
This worked great! Big help. thanks
Could you use this method on page 0?
I’m thinking to have a DA “After Refresh” of every IR region on the system to execute a small piece of custom code. We have hundreds of reports across many pages, and I’m trying to find a way to execute this code without changing every page or using DB triggers on system tables.