CODEUNIT.RUN #1

One of those multiple choice questions I pose to my students at the start of each day during a Solution Development training.

What would be the right answer? Of course you’re free to test it in NAV, but first give it a try “from the bare head”.

Given:

Codeunit 50000:
OnRun()
ERROR(‘Internal error’);

Codeunit 50001:
OnRun()
IF CODEUNIT.RUN(50000) THEN
  ERROR(‘An error occurred’);

Which error will occur when codeunit 50001 is being executed?

  1. ‘Internal error’
  2. ‘Internal error’ and ‘An error occurred’
  3. ‘An error occurred’
  4. none

One Comment

  1. Indeed somewhat tricky, but apparently of those who did dare to "speak" out by way of the comments, the majority was right. Answer 4 is the right answer.

    How about the next question: CODEUNIT.RUN #2

Leave a Reply

Your email address will not be published. Required fields are marked *