Hello everyone,
I would like to ask whether it's possible to revert approved action on a workflow item with X++, meaning that the status of the item should be back to be "in review"/pending.
Here is the case why I need that:
I need to post a ledgerJournal After a TrvCashAdvance is approved. If the posting fails, the approved action should be cancelled/reverted. I put my code to post the ledger journal on "completed" method on TrvWorkflowEventHandler.
Here is the snippet.
Because this code happens after approval, my idea is to put the code for reverting approval in the catch section. Any other way to achieve this is very welcome. Thanks in advance.
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (