Close the Quote Entry screen on after adapter method

Hello All,

We are trying to Close the Quote Entry screen on after the adapter method in Quote Form and we get the following error.

So basically when we click create sales order on quote form we pass the order num and open order entry screen.

Everything works even it closes the quote form but we get the below error …can someone help (we already tried oTrans.NotifyAll() before quoteform close)

Application Error

Exception caught in: Erp.UI.QuoteEntry

Error Detail

============

Message: Object reference not set to an instance of an object.

Program: Erp.UI.QuoteEntry.dll

Method: checkQuoteHedClosed

Client Stack Trace

==================

at Erp.UI.App.QuoteEntry.Transaction.checkQuoteHedClosed()

at Erp.UI.App.QuoteEntry.Transaction.resetActionMenus()

at Erp.UI.App.QuoteEntry.Transaction.GetQuoteData(Int32 quoteNum)

Application Error

Exception caught in: Erp.Adapters.QuoteAsm

Error Detail

============

Message: Object reference not set to an instance of an object.

Program: Erp.Adapters.QuoteAsm.dll

Method: get_quoteAsmData

Client Stack Trace

==================

at Erp.Adapters.QuoteAsmAdapter.get_quoteAsmData()

at Erp.UI.App.QuoteEntry.Transaction.jobUndo()

at Erp.UI.App.QuoteEntry.Transaction.Undo()

at Erp.UI.App.QuoteEntry.CreateOrderWizardForm.OnClosing(CancelEventArgs e)

The code is here

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":

                                                        EpiDataView edvQuoteHed = ((EpiDataView)(this.oTrans.EpiDataViews["QuoteHed"]));

                                                        if ((bool) edvQuoteHed.dataView[0]["Quoted"] == true)

                                                                       btnPDF.Enabled = true;

                                                        else

                                                                       btnPDF.Enabled = false;

          

          

                                                       

                                                                       //code to check on after get by id if sales order was created from quote.

                                                                       //MessageBox.Show("In Get BY ID After method with var set to: " + createdSalesOrderFromQuote.ToString());                                                           

                                                                       if (createdSalesOrderFromQuote)

                                                                                      {

                                                                                                     createdSalesOrderFromQuote = false;

                                                                                                     try

                                                                                                                    {

                                                                                                                    string passedOrderNum = (string)edvQuoteHed.dataView[edvQuoteHed.Row]["ShortChar05"];

                                                                                                                                                                                                             

          

                                                                                                                    MessageBox.Show("Call Context Character10: " + passedOrderNum);

                                                                                                                    if (!String.IsNullOrEmpty(passedOrderNum))

                                                                                                                                   {

                                                                                                                                   ProcessCaller.LaunchForm(oTrans, "OMMT3001", passedOrderNum);

                                                                                                                                   QuoteForm.Close();

                                                                                                                                   }

                                                                                                                    }

                                                                                                     catch (Exception e)

                                                                                                                    {

                                                                                                                    MessageBox.Show(e.Message,"Error launching order entry form.");

                                                                                                                    }                                                                                        

                                                                                      }

                                                       

                                                        break;

We are getting this issue as well, did you get a solution?