bcquality/community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.good.al
Stefano Demiliani ebceff2332 knowledge(performance): add community rules for JIT, locks, and false positives
These articles capture BC-specific mechanics agents still invert: partial-record JIT on writes, Reset clearing SetLoadFields, HttpClient inside write transactions, and batched number series, plus negative guidance that stops over-eager Query and IsEmpty "fixes".

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:57:58 +02:00

15 lines
480 B
AL

codeunit 50100 "Skip LoadFields Write Good"
{
procedure UppercaseUsCustomerNames()
var
Customer: Record Customer;
begin
// Write path: load the full row. SetLoadFields would JIT on Modify.
Customer.SetRange("Country/Region Code", 'US');
if Customer.FindSet(true) then
repeat
Customer.Name := UpperCase(Customer.Name);
Customer.Modify(false);
until Customer.Next() = 0;
end;
}