MES - Work Queue - ShowDialog - Refresh parent window

Hello,

We have a customization in the Work Queue that adds a new column, however due to the amount of data in the Work Queue, this customization causes a major slowdown. Until we can figure a solution, I setup a custom Work Queue button, using both methods in the link below, that loads the form with no customization. However, when they use that Work Queue, and add one or more active work records, it doesn’t refresh the main MES window’s active work view.

Here’s the link I used to try ProcessCaller.LaunchForm() and .ShowDialog():

Has anyone done something like this before where you needed to load a custom form and refresh the parent window? I am more of a web developer, so I am used to callbacks but I didn’t see anything like that for ShowDialog().

I hope this all makes sense and thank you for your time!
Rob

So I found this thread here on the forum:

I figured I’d update my thread and link to this to aid others. I am going to attempt this method now and see if this will allow me to manually refresh the LaborDtl grid on the main MES screen.

So I tried the above call back concept, where I created a new menu item for the Work Queue with no customization, in the custom code I set it up like the below. The handler never gets called, either if I just click Close in the Work Queue or if I start an activity and then close. I welcome any thoughts you may have, thank you!

// Loads the Work Queue without a customization
// NOTE: Work Queue form checks for employee ID logged in, else cannot do anything
private void MyCallBackHandler(object sender, object CallBackArgs)
{
	MessageBox.Show("Call Back Handler Ran");
	// verify there is CallBack args
	if (CallBackArgs == null) return;
	EpiMessageBox.Show("CallBack message:" + CallBackArgs.ToString());
}
private void btnWorkQueueNoSS_Click(object sender, System.EventArgs args)
{
	LaunchFormOptions lfo = new LaunchFormOptions();
	lfo.CallBackMethod = MyCallBackHandler;
	ProcessCaller.LaunchForm(oTrans, "WRKQNC01", lfo);
}

I hope my thread here helps other, lol.

The trick was to use LaunchedFormClosed, not CallBackMethod. I found that here: