mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
* Fix lifecycle compatibility guidance Correct high-confidence Business Central guidance and samples for upgrade tags, collectible errors, trigger semantics, obsoletion, events, interfaces, API contracts, and test transactions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e05a43e7-6448-4d67-9c73-798523f5d945 * Address guidance review findings Gate SecretText guidance to BC23 and clarify that the collectible-error sample intentionally emits a message-only blocking aggregate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e05a43e7-6448-4d67-9c73-798523f5d945 --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
27 lines
639 B
AL
27 lines
639 B
AL
codeunit 50154 "Test Sample TransModel Bad"
|
|
{
|
|
Subtype = Test;
|
|
|
|
[Test]
|
|
[TransactionModel(TransactionModel::AutoRollback)]
|
|
procedure TestPostingRoutineAutoRollback()
|
|
var
|
|
PostingRoutine: Codeunit "Posting Routine Commit Bad";
|
|
begin
|
|
// Runtime error: AutoRollback forbids the Commit reached below.
|
|
PostingRoutine.PostCustomer();
|
|
end;
|
|
}
|
|
|
|
codeunit 50156 "Posting Routine Commit Bad"
|
|
{
|
|
procedure PostCustomer()
|
|
var
|
|
Customer: Record Customer;
|
|
begin
|
|
Customer.Init();
|
|
Customer."No." := 'T-BADCOMMIT';
|
|
Customer.Insert(true);
|
|
Commit();
|
|
end;
|
|
}
|