MB-820 study materials
MB-820 study resources

MB-820: Develop by using AL

MB-820 · Work through your exam, one topic at a time.

All guide sections

Develop by using AL

Reading small snippets

This domain tests whether you can read a short AL fragment and predict behaviour. Know the table triggers: OnInsert, OnModify, OnDelete, OnRename, plus field-level OnValidate and OnLookup; and page/codeunit triggers such as OnOpenPage, OnAfterGetRecord and OnRun.

Assign vs Validate: Rec.Quantity := 10; bypasses OnValidate; Rec.Validate(Quantity, 10); runs it. Modify() defaults to Modify(false) and skips the OnModify/OnValidate logic; Modify(true) runs it. xRec holds pre-modification values and is only populated inside Modify, Rename, Delete and the related triggers.

Finding data: SetRange, SetFilter (with %, *, .. and |) and FilterGroup belong before Find, FindSet or Get. SetLoadFields builds a partial record - only the listed fields are read, so any other field is blank until you refetch. FlowFields require CalcFields (or CalcSums/CalcAverage) before you can read them.

Collections and JSON: Dictionary, List, JsonObject, JsonArray and JsonToken. Dictionary.Get returns false for a missing key rather than throwing, which is a favourite question.

Extensibility: publish an IntegrationEvent so other extensions can subscribe; use the IsHandled pattern for business events so a subscriber can suppress default logic - and check the code actually respects IsHandled.

Rule of thumb: when a snippet assigns a field directly and the question asks whether validation ran, the answer is no; use Validate.

Traps: expecting OnValidate after a direct assignment; reading a FlowField without CalcFields; believing Find('-') raises an error (Get does, Find returns false); relying on the removed implicit with statement in runtime 6.0 and later.