mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
Transaction and error handling in BC AL - new knowledge articles
This commit is contained in:
parent
7dd3f4777d
commit
4ce7d816cc
19 changed files with 415 additions and 10 deletions
|
|
@ -1,15 +1,14 @@
|
|||
codeunit 50129 "Perf Sample CommitInLoop Bad"
|
||||
{
|
||||
procedure ReleaseAllOrders()
|
||||
procedure NormalizeCustomerNames()
|
||||
var
|
||||
SalesHeader: Record "Sales Header";
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
SalesHeader.SetRange(Status, SalesHeader.Status::Open);
|
||||
if SalesHeader.FindSet() then
|
||||
if Customer.FindSet(true) then
|
||||
repeat
|
||||
SalesHeader.Status := SalesHeader.Status::Released;
|
||||
SalesHeader.Modify();
|
||||
Customer.Name := UpperCase(Customer.Name);
|
||||
Customer.Modify();
|
||||
Commit();
|
||||
until SalesHeader.Next() = 0;
|
||||
until Customer.Next() = 0;
|
||||
end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue