Sadly, the button will not refresh anything. In developer mode, it doesn’t even say “execute BAQ”.
The only way for me to refresh the grid is to go to the 3 dots and click refresh grid.
Question 1) Did I set up calling a native event properly?
Question 2) Why does calling the native event work and selecting Refresh Grid as the next event fail? I am trying to expand my knowledge base and understanding.
I can’t speak to why the grid-refresh doesn’t do what it looks like it would do, but calling another event is just as simple as you’ve shown.
You could look into that native event to see what actions it does … see how Epicor does a grid refresh so that you can understand how it works - there may be other actions needed to make grid-refresh work properly … or maybe it just is not the thing to be used here
yes, as @jwphillips mentioned, try to figure out using the developer/debug tools what event is firing when it’s selected from the menu.
you could also open the events list and search for “Refresh” there may be multiple to pick from (e.g. Refresh, RefreshAll…)
Also, too often Application Studio can be goofy, sometimes just closing app studio (save your changes) and reopening fixes such behavior…that was happening to me multiple times yesterday
I used developer tools to see what events were triggered with “grid refresh” and compared it to “event-next” that calls the native event refresh_QuoteMaterial_2_0 . The “grid refresh” does not trigger any event and there is no ExecuteBAQ on the Network Tab of Developer tools. When I use the “event-next” it ExecutesBAQ and triggers the proper event.
Using “event-next” is working.
Thank you for the replies and again, I really appreciate this forum and the support that is given to solve issues.
Heide Warren
After looking around some more… (not knowing whether you’ve already found these)
The native event that you call is using property-set to set the grid’s Invalidated property to true … and that is triggering the BAQ to run again. That has to be a feature of the grid being populated by Provider Model.
and looking a little more into grid-refresh:
Apparently, the grid-refresh widget is looking for the ID of the grid itself (under Grid Model)
I think that @jwphillips is on to how to make the “grid-refresh” event work for Panel Card grids that are filled using a BAQ. I followed the link that he attached.
If I just make an event with only “grid-refresh” then it will not ExecuteBAQ and data will not fill the grid. I have to put a property set before the “grid-refresh” and set the Component ID in Parameters and the Prop to invalidated and value “true”.
That is how I was able to use the grid-refresh button to work and force ExecuteBAQ.
Sadly, when I clicked the column header to re-order the data by date, it triggered the BAQ to execute again. The ExecuteBAQ got caught in some loop and just kept executing if I clicked within the data grid.