bcquality/microsoft/knowledge/performance/use-dictionary-for-temporary-identity-lookups.good.al
Jesper Schulz-Wedde 5bcdc55df9 Sync knowledge articles with review agent instructions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-05 14:08:32 +02:00

13 lines
470 B
AL

codeunit 50933 "Perf Sample Dictionary Good"
{
procedure MarkSeenCustomers(var SalesLine: Record "Sales Line")
var
SeenCustomerNos: Dictionary of [Code[20], Boolean];
begin
if SalesLine.FindSet() then
repeat
if not SeenCustomerNos.ContainsKey(SalesLine."Sell-to Customer No.") then
SeenCustomerNos.Add(SalesLine."Sell-to Customer No.", true);
until SalesLine.Next() = 0;
end;
}