I’m overriding on of Acumatica methods. This method is triggered when “Remove Hold” action is called. The method clears all records from Approval table. I would like to keep this records. So I have added a trigger on the table that restores any deleted record. My method is called after Remove Hold does it work. I would like to access the records restored by trigger and manipulate a certain record. What happens I can see the record exist in DB when I select from query analyzers but my method is not being informed and returns null value. How can I address this issue?
action/method is not informed of restored deleted record by trigger
Best answer by aaghaei
Thanks
I couldn’t override the method that resets the approval as it is one of the private protected methods buried deep down in one of the approval map classes.
instead, I removed the trigger, added a list variable to my method before calling Acumatica’s standard action, broke the link between approval table that will be rest and the current document by changing parent ref to a temp value, call Acumatica’s base method, and finally reestablishing the broken link by restoring from the list variable I kept in memory. To ensure either everything is completed as expected or fully rolled back, I put the full method in a transaction scope. This worked perfectly but was some extra work compared what could have been achieved using trigger.
Login to the community
No account yet? Create an account
Social Login
Login with your Acumatica accountEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.