Good afternoon,
I have a rather complex dashboard that has two UBAQs. The updatable part is only so I can check off some flags to tell the system which rows to process. The UBAQs work just fine. The dashboard works alright too. With one exception. When I refresh the dashboard, the most recent data is not always returned. If I refresh two or three times, I will eventually get the updated data populated.
The UBAQ in question closes an open sales order release based on which row you check off. After processing the BAQ action, I can see in the Sales Order that the releases have been closed, but the grid in the dashboard still shows the old records.
I don’t think the UBAQ code is an issue. I think it must be with the dashboard customization code.
Here is the code from the dashboard customization:
private void epiButtonC1_Click(object sender, System.EventArgs args)
{
//Call Actions
oTrans.PushStatusText("Running Custom Actions...", false);
//check to see if there are any boxes checked in OurUnmatched, if so, then execute custom action
oTrans.PushStatusText("Processing commands for our unmatched orders...", false);
//V_OurUnmatchedOrders_faster_1View
var edv = oTrans.Factory("V_OurUnmatchedOrders_faster_1View");
BAQRunCustomAction(edv, "ProcessCommands");
//check to see if there are any boxes checked in Unmatched, if so, then execute custom action
oTrans.PushStatusText("Processing commands for unmatched orders...", false);
//V_OpenOrders_1View
edv = oTrans.Factory("V_CTEOpenOrders_1View");
BAQRunCustomAction(edv, "ProcessCommands");
//Call Dash Refresh All
RefreshAllBAQs();
}
void RefreshAllBAQs()
{
oTrans.PushStatusText("Refreshing all views. Please be patient...", false);
MainController.AppControlPanel.HandleToolClick("RefreshAllTool", new
Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshAllTool"], null));
oTrans.PushStatusText("Done!", false);
}
void BAQRunCustomAction(EpiDataView iEdv, string iActionID)
{
BAQDataView BAQView = (BAQDataView)iEdv;
Assembly assembly = Assembly.LoadFrom("Ice.Lib.EpiClientLib.dll");
Type t = assembly.GetType("Ice.Lib.Framework.BAQUpdater");
MethodInfo mi = t.GetMethod("BAQRunCustomAction", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
mi.Invoke("Ice.Lib.Framework.BAQUpdater", new object[]{BAQView, iActionID});
}
I have confirmed that I am referencing the correct data view, and that my UBAQs have the correct custom actions in place. The custom actions work fine. It is just that the dashboard grid doesn’t update when I click the button.
When I click the button, I expect the UBAQ custom action to execute (it does) and then I expect the dashboard to refresh all. It does do this, but the refresh returns the wrong data at least once or twice before returning the correct data.
I did also try adding RefreshAllBAQs() three times in a row, since that is what we literally do using the refresh button on the dashboard. This didn’t help. It looks like it only refreshes once, or if it did three times it was too fast to see. Sometimes this doesn’t work either, and I have to close the dashboard and reopen it to see the updated data.
Has anyone seen anything like this before? I think an update in the last 6 months did this.
Thanks for your time!
Nate