I have scheduled a ProcessAll action. I have a
throw new PXOperationCompletedException(statusText);
at the end of the routine if there are no errors during the process. However, this causes the schedule to show with a red X icon on the Automation Schedules screen. Commenting out the exception allows the schedule to show a green check mark, but then the status text is not returned nor does it show on the regular process page when hovering over the check mark at the top of the screen. Is there another PXOperationCompleted variation to handle this?
This seems to be a potential issue on the Acumatica side. Throwing PXOperationCompletedException
should not result in error status shown on the Automation Schedules screen.
To answer your question, throwing PXOperationCompletedException
at the end of a background operation is currently the only supported option to show a custom message for a successfully completed process.
I have sent all details to Acumatica engineering Team for review. Hopefully, the fix will be released soon in one of the upcoming updates.