Supressing of Error messages and return value

Hi, In navision, to determine whether the codeunit is executed successfully your coding is as followe: IF Codeunit.RUN THEN… but by doing this you will supress all the error messages generated by the codeunit and you won’t know what went wrong. Is there a way for us to determine whether the codeunit was executed successfully and at the same time, not supressing the error messages generated from the coding? i tried to study the codeunit 243, code() function, it uses something similar to IF Codeunit.RUN THEN… but as you know, when entries are posted from the item journal, it will still show us error messages during execution of codeunit, it did not supress the error messages from the codeunit. why? tq

This does not suppress errors generated by the codeunit.

What is does is suppress errors generated by the Codeunit.RUN statement. Allowing you to catch and handle them in your own way.

IF Codeunit.RUN THEN BEGIN

END ELSE BEGIN

ErrorHandling;

END;