Application Studio, Refresh grid with button event

Public Cloud, Version 2024.2.4

Goal: Change tracker filters, click button to refresh grid based on the new filtered values

What do I have so far?

  1. Eliminated tracker from Classic Dashboard
  2. Uplift classic dashboard to Kinetic by deploying Kinetic dashboard
  3. Created two TransView variables
  4. Using BAQ Options to filter grid on TransView variables
  5. Created button. For the button on-click created an event. I have not set any parameters or target.

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.

I followed Application studio, Refresh data after Event and @hmwillett explains to make a event-next and call a native event.

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.

Thank you for the support,
Heide Warren

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

1 Like

Thank you to both @jwphillips and @datadaddy for your replies.

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.
image

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

1 Like

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)

2 Likes

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”.


image
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.


image

I will be using “next-event” and the native refresh to refresh the grid. It works more reliably and it is simpler to build.

1 Like