mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
Add BC performance knowledge from OptimAL learnings (#198)
* Add BC performance knowledge from OptimAL learnings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address review feedback on performance guidance Clarify predicate-supporting keys versus covering queries, demonstrate proven cache reuse, and evaluate the updated partial-load and bulk-update rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
56ce52a9c7
commit
87ba36e650
37 changed files with 920 additions and 37 deletions
|
|
@ -0,0 +1,39 @@
|
|||
// Quantity validation depends only on Quantity and Unit Price in this demo.
|
||||
table 50371 "Perf Validated Line"
|
||||
{
|
||||
DataClassification = CustomerContent;
|
||||
|
||||
fields
|
||||
{
|
||||
field(1; "Line No."; Integer) { }
|
||||
field(2; Quantity; Decimal)
|
||||
{
|
||||
trigger OnValidate()
|
||||
begin
|
||||
Amount := Quantity * "Unit Price";
|
||||
end;
|
||||
}
|
||||
field(3; "Unit Price"; Decimal) { }
|
||||
field(4; Amount; Decimal) { }
|
||||
field(5; Note; Text[100]) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Line No.") { Clustered = true; }
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50372 "Perf Validation Bad"
|
||||
{
|
||||
procedure UpdateLine(LineNo: Integer; NewQuantity: Decimal; NewNote: Text[100])
|
||||
var
|
||||
Line: Record "Perf Validated Line";
|
||||
begin
|
||||
Line.Get(LineNo);
|
||||
Line.Validate(Quantity, NewQuantity);
|
||||
Line.Note := NewNote;
|
||||
Line.Validate(Quantity, NewQuantity);
|
||||
Line.Modify(false);
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue