Important detail that caused me a bug recently and I want to share with others who are writing AL Code for Business Central.
When you pass a record to a procedure then you can do that either by pass-by value or pass-by reference.
When you have code like this:
and you pass-by value:
procedure ApproveEntry(Entry: Record "Approval Workflow Entry")
then all filters are cleared on the record and you get a empty record on your procedure.
when you pass-by reference:
procedure ApproveEntry(var Entry: Record "Approval Workflow Entry")
when all filters on the record are preserved.
Small detail but it caused me some tinkering over :)