Solved

PXProcessing result screen is messed up

  • 26 January 2021
  • 1 reply
  • 67 views

I have a processing screen that works perfectly.  After processing, all data is updated correctly and the screen looks and functions exactly as it should.

However, when the processing is complete, the results window is screwed up.

When I click POST ALL, the code posts any entries that are unposted (based on the drop down filter) and does not post entries with a batch error.  WORKS GREAT!

When the processing delegate fires, if the batch has errors, I throw an exception on that record

PXProcessing<ICSPendingHDR>.SetError(entriesToProcess.IndexOf(entry), e);

On the web site, the processing screen temporarily shows an item in the ERROR box which is what I expect:

 

Then, when both records have been processed, the results changes to 2 process successfully

 

When I click the 2 Processed button, I get results that are messed up.  The Batch Has Errors column should show a checkbox and not True or False.  It is pushing the columns to the right.  Also, the descriptions on the Messages are in the wrong order.  

There are only 2 places in the method that set a message:

When successfully posted:

PXProcessing.SetInfo(string.Format(Messages.EntryHasBeenPosted, entry.GLBatchNbr));

When the batch has an error status: (this is thrown in the catch:

PXProcessing<ICSPendingHDR>.SetError(entriesToProcess.IndexOf(entry), e);

 

Is there a bug in the results window?

If I cannot fix this, is there a way I can simply HIDE that popup window?  These will mostly be processed in a scheduled process anyway.

 

 

icon

Best answer by Naveen B 2 February 2021, 08:19

Hi Joe,

I also faced a similar kind of issue in my processing screen and I fixed it. Please find the details below.


I have a requirement with a processing screen to create and release the payments. 

When I write a logic to create payment releasing the payment I also got the same mixed results. Then I verified by commenting code by code and identified the root cause of this issue.

As we already know that Processing screen will run in a separate thread and also "Release" action will also create a thread, when we invoke the "Release" action from the code level. Hence got the mixed results.

To fix this issue, I added a PXLongRunOperation for Release action to execute my logic in a separate thread.  After I added code like below I got the proper results.

PXLongOperation.StartOperation(this, delegate ()
   {
       if (arpaygraph.Actions.Contains("Release"))
       {
           arpaygraph.Actions["Release"].Press();
       }   
   }

Hope this helps to resolve your issue as well.

View original

1 reply

Userlevel 5
Badge +3

Hi Joe,

I also faced a similar kind of issue in my processing screen and I fixed it. Please find the details below.


I have a requirement with a processing screen to create and release the payments. 

When I write a logic to create payment releasing the payment I also got the same mixed results. Then I verified by commenting code by code and identified the root cause of this issue.

As we already know that Processing screen will run in a separate thread and also "Release" action will also create a thread, when we invoke the "Release" action from the code level. Hence got the mixed results.

To fix this issue, I added a PXLongRunOperation for Release action to execute my logic in a separate thread.  After I added code like below I got the proper results.

PXLongOperation.StartOperation(this, delegate ()
   {
       if (arpaygraph.Actions.Contains("Release"))
       {
           arpaygraph.Actions["Release"].Press();
       }   
   }

Hope this helps to resolve your issue as well.

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 — 2020  Acumatica, Inc. All rights reserved