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
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:
When the batch has an error status: (this is thrown in the catch:
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.
Best answer by Naveen B
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 ()
Hope this helps to resolve your issue as well.