Learn AL by writing AL.
Practice problems for Business Central developers. Open one in your browser and start typing — no Docker container, no sandbox tenant, no server installation.
CustomerBalance.al
codeunit 50100 "Customer Balance"
{
procedure OverdueFor(CustNo: Code[20]): Decimal
var
Customer: Record Customer;
begin
if not Customer.Get(CustNo) then
exit(0);
Customer.SetFilter("Date Filter", '..%1', Today());
Customer.CalcFields("Balance Due (LCY)");
exit(Customer."Balance Due (LCY)");
end;
} Running tests… 531 ms