Edit

Compiler Error AL0118

Note

The AL diagnostics topics are in preview. If you have input for this topic, we'd love to hear from you. Use our GitHub repo to create a PR and add content to this topic by going to here. To read about contributing, see Contribute to the Help. Thanks!

The name '{0}' does not exist in the current context.

Description

The referenced name does not exist in the current context.

How to fix this diagnostic?

The compiler can't resolve the name at the reported position. It isn't declared, it's out of scope, or it comes from a dependency you haven't referenced.

To fix it:

  1. Check the spelling and quoting of the name. Names with spaces or special characters must be quoted, for example "No. Series".
  2. Make sure the variable, parameter, or method is declared and in scope.
  3. If the name belongs to another extension, add that extension to the dependencies in app.json.
  4. Use IntelliSense or Go to Definition (F12) to confirm the symbol exists and is accessible.
var
    Cust: Record Customer;
begin
    // 'Customr' is misspelled -> AL0118
    Customr.FindFirst();
    // Correct
    Cust.FindFirst();
end;

Get Started with AL
Developing Extensions