bcquality/microsoft/knowledge/breaking-changes/do-not-modify-code-already-marked-obsolete.good.al
Jesper Schulz-Wedde 4ca6452ccf Add breaking-changes knowledge domain and review leaf skill
Seed a new breaking-changes (AL API stability) knowledge domain with six
articles plus good/bad AL samples, a new al-breaking-changes-review leaf
skill, and minimal wiring into al-code-review and the README.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-25 12:29:44 +02:00

26 lines
745 B
AL

codeunit 50315 "Pricing Api Good"
{
// Obsolete member left untouched — it only forwards to the replacement and
// gains no new logic.
[Obsolete('Use GetUnitPrice instead.', '25.0')]
procedure GetPrice(ItemNo: Code[20]): Decimal
begin
exit(GetUnitPrice(ItemNo));
end;
// New behaviour is built on the supported replacement, not on the obsolete member.
procedure GetUnitPrice(ItemNo: Code[20]): Decimal
begin
exit(CalculateBasePrice(ItemNo) + CalculateSurcharge(ItemNo));
end;
local procedure CalculateBasePrice(ItemNo: Code[20]): Decimal
begin
exit(100);
end;
local procedure CalculateSurcharge(ItemNo: Code[20]): Decimal
begin
exit(5);
end;
}