bcquality/microsoft/knowledge/performance/httpclient-inside-write-transaction-holds-locks.bad.al
Jesper Schulz-Wedde 42ff075793 Promote knowledge for Microsoft review skills
Move canonical knowledge for Microsoft-owned review domains into the Microsoft layer and document the skill/knowledge co-location policy.

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

Copilot-Session: 2a6ea875-d38e-4f30-aadb-0d606f9be231
2026-09-03 14:59:44 +02:00

13 lines
444 B
AL

codeunit 50100 "HttpClient Holds Locks Bad"
{
procedure SyncCustomerLastName(var Customer: Record Customer)
var
Client: HttpClient;
Response: HttpResponseMessage;
begin
Customer."Search Name" := Customer.Name;
Customer.Modify(false);
// Locks from Modify are held for the entire HTTP wait.
Client.Get(StrSubstNo('https://example.local/sync/%1', Customer."No."), Response);
end;
}