Correct performance knowledge guidance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 667c64a8-eb36-4440-bc41-6a97d8fb5542
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 11:18:52 +02:00
parent 7a678d1aff
commit 3f0b6a41db
31 changed files with 279 additions and 261 deletions

View file

@ -1,13 +1,13 @@
codeunit 50233 "Perf Sample ReadIso Bad"
{
procedure GetOrCreate(var AgentStatus: Record "Agent Status")
procedure IsCustomerBlocked(CustomerNo: Code[20]): Boolean
var
Customer: Record Customer;
begin
// LockTable poisons every subsequent read of Agent Status in the
// surrounding transaction with UPDLOCK even for callers that only read.
AgentStatus.LockTable();
if not AgentStatus.Get() then begin
AgentStatus.Init();
AgentStatus.Insert();
end;
Customer.LockTable();
if not Customer.Get(CustomerNo) then
exit(false);
exit(Customer.Blocked <> Customer.Blocked::" ");
end;
}