bcquality/microsoft/knowledge/performance/use-textbuilder-for-loop-string-assembly.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

14 lines
369 B
AL

codeunit 50931 "Perf Sample TextBuilder Good"
{
procedure BuildItemList(var Item: Record Item): Text
var
Builder: TextBuilder;
begin
if Item.FindSet() then
repeat
Builder.AppendLine(StrSubstNo('%1,%2', Item."No.", Item.Description));
until Item.Next() = 0;
exit(Builder.ToText());
end;
}