mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 23:56:56 +01:00
Add 18 more community AL/BC patterns across appsource, data-modeling, error-handling, security, style, testing, ui, upgrade, and web-services
Second contribution from CURABIS ApS, generalized from patterns observed across real AppSource/PTE development. Cross-checked against the current microsoft/knowledge corpus before opening; several originally-drafted candidates were dropped as duplicates of existing files.
This commit is contained in:
parent
07e324ddbc
commit
a4d85c3e9e
50 changed files with 1262 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
codeunit 50100 "Sales Line Management"
|
||||
{
|
||||
procedure RecalculateLine(var SalesLine: Record "Sales Line")
|
||||
begin
|
||||
SalesLine."Total Amount" := SalesLine.Quantity * SalesLine."Unit Price";
|
||||
SalesLine.Modify();
|
||||
end;
|
||||
}
|
||||
|
||||
page 50100 "Sales Line Card"
|
||||
{
|
||||
PageType = Card;
|
||||
SourceTable = "Sales Line";
|
||||
|
||||
actions
|
||||
{
|
||||
area(Processing)
|
||||
{
|
||||
action(Recalculate)
|
||||
{
|
||||
trigger OnAction()
|
||||
begin
|
||||
SalesLineMgt.RecalculateLine(Rec);
|
||||
end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var
|
||||
SalesLineMgt: Codeunit "Sales Line Management";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue