Skip to main content
Question

System Event Error – “The previous operation has not been completed yet” on Custom Processing Screen Description:

  • November 27, 2025
  • 1 reply
  • 28 views

Hi,

We are encountering the error “The previous operation has not been completed yet” on our custom processing screen in the Acumatica 25R1 version. This issue did not occur in the previous versions.

I have attached a sample processing screen where the error is reproduced. The underlying code is functioning correctly, and the scheduler screen does not show any issues.

We request assistance in understanding why the scheduler is failing with this error message and guidance or a fix to resolve the issue.

DAC: 

public class SyncProcessFilter : IBqlTable
{
    #region Message
    public abstract class message : PX.Data.BQL.BqlString.Field<message> { }

    [PXString]
    [PXUIField(DisplayName = "Message")]
    public virtual string Message { get; set; }
    #endregion

   #region NoteID
   [PXNote()]
   public virtual Guid? NoteID { get; set; }
   public abstract class noteID : BqlGuid.Field<noteID> { }
   #endregion
}

 Graph: 

public class SampleProcessingGraph : PXGraph<SampleProcessingGraph>
{
    #region Views

    public PXCancel<SampleFilterDAC> Cancel;

    [PXVirtualDAC]
    public PXProcessing<SampleFilterDAC> ProcessRecords;

       #endregion

 

    #region Constructor

    public SampleProcessingGraph()
    {
        ProcessRecords.SetProcessVisible(false);
        ProcessRecords.SetProcessAllCaption("Process");

        ProcessRecords.SetProcessDelegate(
            delegate (List<SampleFilterDAC> list)
            {
                ExecuteSync();
            });
    }

    #endregion

 

    #region Processing Screen Delegate

    protected virtual IEnumerable processRecords()
    {
        bool found = false;

        foreach (SampleFilterDAC item in ProcessRecords.Cache.Inserted)
        {
            found = true;
            yield return item;
        }

        if (found)
            yield break;

        // Insert a single row to display a message on the screen
        yield return ProcessRecords.Insert(new SampleFilterDAC
        {
            Message = "Click Process to start execution."
        });
    }

    #endregion

    #region Main Processing Loop

    public static void ExecuteSync()
    {
        var graph = CreateInstance<SampleProcessingGraph>();
        graph.ExecuteSyncInternal();
    }

    public virtual void ExecuteSyncInternal()
    {
        DateTime start = DateTime.Now;

        while (true)
        {
            // Example fetch of unprocessed records
            List<SampleSyncData> records =
                PendingData.Select().RowCast<SampleSyncData>().ToList();

            try
            {
                // Your single/batch processing logic here
            }
            catch (PXException ex)
            {
                PXTrace.WriteError(ex);
            }

            // Break loop based on maximum allowed execution time
            double elapsed = (DateTime.Now - start).TotalSeconds;

 

            if (elapsed > (Setup.Current.CheckProcessTime ?? 60))
                break;

            // Pause between cycles
            System.Threading.Thread.Sleep(
                Convert.ToInt32(Setup.Current.ProcessSleepTime ?? 5) * 1000);
        }
    }

    #endregion
}

1 reply

Forum|alt.badge.img+8
  • Captain II
  • December 1, 2025

@sruthic25 

 

You should call the method from within a PXLongOperation, then you will be able to use PXLongOperation.WaitCompletion(YourGraph.UID). This will only go to the next part of your method after the previous part has completed.