I have added a textbox to the Quote Entry form that is tied to RelSalesOrder.OrderNum (this works for us to always pull the first row because we have a 1:1 for Quote:Order).
I would like to be able to retrieve the EpiDataView after the order is created from the Quote>Order Wizard form. I was thinking either do this via reflection and click the retrieve button or manually call the EpiDataView refresh.
However, I need a trigger for this custom code. My thought was that I could either monitor the closed event of the Quote>Order Wizard modal form from Quote Entry, or the closing event on Quote>Order Wizard and have it refresh the Quote Entry (parent) form. Any ideas on what these events would be?
So after an order is created via the Quote->Order wizard (just in quote entry, and not in Order Entry?), you want some info from the Order to be able to populate a field(s) in the Quote?
That is correct. I would like the first Releated Sales Order row from the first QuoteLine to pull the OrderNum into the custom textbox that sits on the Header tab. This will allow the user to use the Context Menu to open the sales order from this textbox when they are ready.
RelSalesOrder EpiDataView lives in Quote Entry>Line>Related Sales Order.
I would use a BAQ Dataview to display the order. If the data doesn’t refresh automatically after the order is created, force a refresh of the BAQ Dataview after the GetByID adapter method.
private void oTrans_adapter_AfterAdapterMethod(object sender, AfterAdapterMethodArgs args)
{
// ** Argument Properties and Uses **
// ** args.MethodName **
// ** Add Event Handler Code **
// ** Use MessageBox to find adapter method name
// EpiMessageBox.Show(args.MethodName);
switch (args.MethodName)
{
case "GetByID":
//force a refresh here
break;
}
}