Casing mismatch (FC0002)
AL is case-insensitive, but consistent casing improves readability and professionalism. When referencing identifiers (variables, procedures, fields, etc.), the casing should match the original declaration.
This rule detects when the casing of a reference differs from its declaration.
A code fix is available for this diagnostic.
Example
The following code has casing mismatches:
codeunit 50100 MyCodeunit
{
procedure MyProcedure()
var
CustomerName: Text;
begin
customername := 'Test'; // Casing mismatch [FC0002]
MYPROCEDURE(); // Casing mismatch [FC0002]
end;
}
To fix this, use consistent casing that matches the declaration:
codeunit 50100 MyCodeunit
{
procedure MyProcedure()
var
CustomerName: Text;
begin
CustomerName := 'Test';
MyProcedure();
end;
}