Force Refresh on Sales Order Form

I have a customization on some UD fields on Sales Order Detail that get updated via a DD. It works fine, but the custom controls on Sales Order Release doesn’t trigger the intended functionality unless I click “Refresh” on the Toolbar. I am not changing any data, just the behavior of the Controls such “Visible/Enabled/Color Change”.

I tried the following things, but the only thing that works is actually clicking the Refresh button.

// Example of MasterPackPrintForm - you would change that to QuoteForm
MethodInfo mi = typeof(EpiBaseForm).GetMethod(“handleToolClick”, BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(MasterPackPrintForm, new object[]{“PrintClientTool”,new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MasterPackPrintForm.MainToolManager.Tools[“RefreshTool”],null)});

oTrans.Refresh();
oTrans.Update();

I am out of ideas how I can make the entire Sales Order Form refresh through code.

I have done refreshes on forms, but always would do the update first, then the refresh. I would expect that doing the refresh first would clear the data that you wanted to update.

That’s just a guess, take it how you will :slight_smile:

1 Like