BC Teardown #12: Your error messages are riddles

BC Teardown #12: Your error messages are riddles

“Validation failed” is not what an accountant wants to read at 4:55 PM.

The pain

Users hit cryptic errors, screenshot them and email IT. IT asks what they were doing. A one minute fix becomes a two day thread.

Why it happens

Custom code throws messages written by developers for developers, with no hint of what to do next.

Before: A message only the developer gets

if SalesHeader."Shipping Agent Code" = '' then
  Error('Validation failed: SA blank');

After: Tell the user what to do

var
  ErrInfo: ErrorInfo;
begin
  if SalesHeader."Shipping Agent Code" <> '' then
    exit;
  ErrInfo.Title := 'Shipping agent missing';
  ErrInfo.Message :=
    'Pick a shipping agent, then post again.';
  Error(ErrInfo);
end;

The result

Users see a clear title and a next step, and fix it themselves. IT gets their afternoon back.

Tip: ErrorInfo can also add actions, like a button that opens the right page.

Download this teardown as a PDF


Got a Business Central problem like this? Free 30 minute review of your setup. Senior Microsoft certified developers, and you talk to the person writing the code. Contact Dataflow Solutions.