Use parenthesis for function calls

Properties
FC0003 Warning Design Code Fix Ignore Obsolete

The AL compiler accepts function calls without parentheses — Customer.IsEmpty compiles just like Customer.IsEmpty(). Without parentheses, a method call is visually indistinguishable from a property access.

Example

procedure PostSalesOrder(var SalesHeader: Record "Sales Header")
var
    Customer: Record Customer;
begin
    if Customer.IsEmpty then // Use parenthesis for function calls [FC0003]
        exit;

    SalesHeader.Validate("Posting Date", System.WorkDate);
    SalesHeader.Modify;
end;

Add parentheses to every function call:

procedure PostSalesOrder(var SalesHeader: Record "Sales Header")
var
    Customer: Record Customer;
begin
    if Customer.IsEmpty() then
        exit;

    SalesHeader.Validate("Posting Date", System.WorkDate());
    SalesHeader.Modify();
end;

Why this matters

While the AL compiler accepts both Record.Count and Record.Count(), these two forms are parsed as fundamentally different constructs. Without parentheses it looks like accessing a property; with parentheses it is clearly a method call.

Under the hood, the compiler produces a MemberAccessExpression for Record.Count and an InvocationExpression for Record.Count() — these are what analyzers receive, and they are two entirely different node types. Today the AL Language does not have properties on objects, so the compiler lets you get away with either form. But the distinction already affects static analysis tooling and if AL ever introduces real properties, Record.Count and Record.Count() could mean entirely different things.

By always including parentheses you make the intent unambiguous — both for tooling and for anyone reading your code.