Question

event after PXLong

  • 20 December 2022
  • 0 replies
  • 54 views

Helo, 

I want to ask about PXLongOperation.

So I have 2 DataView, 
MasterView (tis view i use to input filter and parameeter)
DetailsView (main view to show the data)

Then I have genearte button to insert the data that I already processed to the DetailsView based on MasterView (parameter view). But the data not saved yet, just inserted to DetailsView.

After that I have code to override persist like this below.

But when this persist completed. The data on the MasterView is gone/blank. What I want is the data stil on MasterView still there, becouse the user will be generate again with the same parameters

So my idea is to set MasterView.Current = dataParam;
but previously the dataParam  is already is set from MasterView.Current


public override void Persist()
        {
            try
            {
                PXLongOperation.StartOperation(this, delegate ()
                {
                    base.Persist();
                    System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5));
                    InsertToOtherTable(listID);

MasterView.Current = dataParam;
                });
            }
            catch (Exception)
            {
                throw;
            }
        }

 

thats why i place MasterView.Current = dataParam; in the end of PXLongOperation

but the MasterView data still gone. Is there any event aveter PXLongOperation to place MasterView.Current = dataParam; ?

 


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved