mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
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>
22 lines
674 B
AL
22 lines
674 B
AL
codeunit 50100 "CountApprox Progress Bad"
|
|
{
|
|
procedure RecalcUsCustomers()
|
|
var
|
|
Customer: Record Customer;
|
|
Window: Dialog;
|
|
Counter: Integer;
|
|
Total: Integer;
|
|
begin
|
|
Customer.SetRange("Country/Region Code", 'US');
|
|
// Exact Count() is a SELECT COUNT(*) just to drive a progress bar.
|
|
Total := Customer.Count();
|
|
Window.Open('Processing #1###### of #2######');
|
|
if Customer.FindSet(true) then
|
|
repeat
|
|
Counter += 1;
|
|
Window.Update(1, Counter);
|
|
Window.Update(2, Total);
|
|
until Customer.Next() = 0;
|
|
Window.Close();
|
|
end;
|
|
}
|