mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 09:26:52 +01:00
21 lines
605 B
AL
21 lines
605 B
AL
codeunit 50128 "Perf Sample CommitInLoop Good"
|
|
{
|
|
procedure NormalizeCustomerNames()
|
|
var
|
|
Customer: Record Customer;
|
|
RowsInChunk: Integer;
|
|
ChunkSize: Integer;
|
|
begin
|
|
ChunkSize := 500;
|
|
if Customer.FindSet(true) then
|
|
repeat
|
|
Customer.Name := UpperCase(Customer.Name);
|
|
Customer.Modify();
|
|
RowsInChunk += 1;
|
|
if RowsInChunk >= ChunkSize then begin
|
|
Commit();
|
|
RowsInChunk := 0;
|
|
end;
|
|
until Customer.Next() = 0;
|
|
end;
|
|
}
|