generated from microsoft/AL-Go-PTE
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...os/src/02 Coding/02 Queries/04 Queries and SumIndexFields/DemoQueryAndSIFTWPT.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
codeunit 62283 "Demo - Query And SIFT WPT" implements "PerfToolCodeunit WPT" | ||
{ | ||
#region LotNumbersQry | ||
procedure LotNumbersQuery() | ||
var | ||
LotNumbersbyBin: Query "Lot Numbers by Bin"; //Default BC Query | ||
begin | ||
LotNumbersbyBin.Open(); | ||
|
||
while LotNumbersbyBin.Read() do; //Debug and check SQL Statement | ||
//do something | ||
|
||
LotNumbersbyBin.Close(); | ||
end; | ||
#endregion | ||
|
||
#region InterfaceImplementation | ||
procedure Run(ProcedureName: Text) Result: Boolean; | ||
begin | ||
case ProcedureName of | ||
GetProcedures().Get(1): | ||
LotNumbersQuery(); | ||
end; | ||
|
||
Result := true; | ||
end; | ||
|
||
procedure GetProcedures() Result: List of [Text[50]]; | ||
begin | ||
Result.Add('LotNumbersQuery'); | ||
end; | ||
|
||
[EventSubscriber(ObjectType::Codeunit, Codeunit::"PerfTool Triggers WPT", 'OnGetSuiteData', '', false, false)] | ||
local procedure OnAfterInsertSuiteGroup() | ||
var | ||
PerfToolSuiteHeaderWPT: Record "PerfTool Suite Header WPT"; | ||
WPTSuiteLine: Record "PerfTool Suite Line WPT"; | ||
PerfToolGroupWPT: Record "PerfTool Group WPT"; | ||
CreatePerfToolDataLibraryWPT: Codeunit "Create PerfToolDataLibrary WPT"; | ||
begin | ||
CreatePerfToolDataLibraryWPT.CreateGroup('02.QUERIES', 'Queries', PerfToolGroupWPT); | ||
|
||
CreatePerfToolDataLibraryWPT.CreateSuite(PerfToolGroupWPT, 'QueryAndSift', 'Queries with(out) SIFT', PerfToolSuiteHeaderWPT); | ||
|
||
CreatePerfToolDataLibraryWPT.CreateSuiteLines(PerfToolSuiteHeaderWPT, WPTSuiteLine."Object Type"::Codeunit, enum::"PerfToolCodeunit WPT"::QueryAndSIFT, true, false, WPTSuiteLine); | ||
end; | ||
#endregion | ||
} | ||
|
||
// Cut/Paste this next line to the enumextension for "PerfToolCodeunit WPT" |
11 changes: 11 additions & 0 deletions
11
...s/src/02 Coding/02 Queries/04 Queries and SumIndexFields/WarehouseEntryExtWPT.TableExt.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tableextension 62203 "WarehouseEntry Ext WPT" extends "Warehouse Entry" //7312 | ||
{ | ||
// keys | ||
// { | ||
// key(Key8WPT; "Location Code", "Item No.", "Variant Code", "Zone Code", "Bin Code", "Lot No.", "Serial No.", "Package No.", "Unit of Measure Code") | ||
// { | ||
// // IncludedFields = "Qty. (Base)"; | ||
// SumIndexFields = "Qty. (Base)"; | ||
// } | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters