bcquality/microsoft/knowledge/performance/use-dictionary-for-temporary-identity-lookups.bad.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

16 lines
553 B
AL

codeunit 50934 "Perf Sample TempLookup Bad"
{
procedure MarkSeenCustomers(var SalesLine: Record "Sales Line")
var
TempCustomer: Record Customer temporary;
begin
if SalesLine.FindSet() then
repeat
if not TempCustomer.Get(SalesLine."Sell-to Customer No.") then begin
TempCustomer.Init();
TempCustomer."No." := SalesLine."Sell-to Customer No.";
TempCustomer.Insert();
end;
until SalesLine.Next() = 0;
end;
}