Overriding errors when CODEUNIT.RUN can't be used

Noisy_VanNoisy_Van Member Posts: 47
I have encountered a situation that I need some help with. I need to override the stock NAV error when a call to a DLL fails. It currently gives an error that says "This message is for C/AL Programmers. The call to member CalculateRequest failed. ..."

My first thought was to use codeunit.run() to achieve this, but from the place I am making the call to the DLL, it cannot be used due to a transaction being started. It is not an option to call a COMMIT before making the DLL call, as I'll run into bigger problems. So, is there any way to override the error message without using codeunit.run()? Or is there another way to call into codeunit.run() (and use the return value) in the middle of a transaction?

Thanks,
Greg

Comments

Sign In or Register to comment.