Hi all!
Thanks for your input on my last related post:
https://www.epiusers.help/t/more-than-one-ubaq-in-a-dashboard/
This post expands on the issue I had encountered at the end, but it doesn’t really have to do with the topic of the original post.
I have a UBAQ loaded into an ultragrid on a dashboard. In the UBAQ there are two checkboxes that allows the user to either delete or update a release. On the dashboard, I added a button to run the custom action (actionID = ProcessCommands) after the user clicks some checkboxes. Here is the code for that button. The function at the bottom just reloads the ultragrid with the refreshed UBAQ.
private void epiBtnUpdateOur_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
DataTable results;
results = new DataTable();
dqa.BOConnect();
dqa.Update("x_ThisWeekUpdate_OurUnmatched", results.DataSet);
dqa.RunCustomAction("x_ThisWeekUpdate_OurUnmatched", "ProcessCommands", results.DataSet, true);
LoadMyBAQ("x_ThisWeekUpdate_OurUnmatched", epiUltraGridC2);
}
I kept getting this error until I went to Updateable BAQ Maintenance and refreshed my UBAQs.
There is no BPM customization attached to Update method of ‘x_ThisWeekUpdate_OurUnmatched’ updatable query in ‘VTAERO’ company or BPM system is not enabled.
Please check presence of BPM customization and/or ask administrator for assistance.
After I updated the BAQ, the error changed to this:
Application Error
Exception caught in: Epicor.ServiceModel
Error Detail
Message: Object reference not set to an instance of an object.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableExceptionClient Stack Trace
at Epicor.ServiceModel.Channels.ImplBase
1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.DynamicQueryImpl.RunCustomActionByID(String queryID, String actionID, DataSet queryResultDataset) at Ice.Adapters.DynamicQueryAdapter.<>c__DisplayClass34_0.<RunCustomAction>b__0(DataSet datasetToSend) at Ice.Adapters.DynamicQueryAdapter.ProcessUbaqMethod(String methodName, DataSet updatedDS, Func
2 methodExecutor, Boolean refreshQueryResultsDataset)
at Ice.Adapters.DynamicQueryAdapter.RunCustomAction(String queryID, String actionId, DataSet updatedDS, Boolean refreshQueryResultsDataset)
at Script.epiBtnUpdateOur_Click(Object sender, EventArgs args)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButtonBase.OnClick(EventArgs e)
at Ice.Lib.Framework.EpiButton.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs e)
at Ice.Lib.Framework.EpiButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It seems like this simple code should do the trick. Can you see any major issues?
Rather than try to fix this code, or figure out this elusive error, does anyone have any code examples showing how you implemented your custom actions inside a dashboard customization?
Thanks a lot for your time!
Nate