Skip to content

Commit

Permalink
GP Added Serial/Lot information to Historical Snapshot for Sales and …
Browse files Browse the repository at this point in the history
…Inventory transactions (#26422)

This change enhances the GP migration to include serial and lot detail
to the historical snapshot.
Fixes
[AB#534934](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/534934)

---------

Co-authored-by: jaymckinney <[email protected]>
  • Loading branch information
jaymckinney-enavate and jaymckinney authored May 17, 2024
1 parent 38cfe27 commit 65f76c1
Show file tree
Hide file tree
Showing 14 changed files with 885 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,64 @@ permissionset 40900 "GP Historical Trx."
Assignable = true;
Access = Public;
Caption = 'GP Historical Transactions';

Permissions = page "Hist. Gen. Journal Lines" = X,
page "Hist. G/L Account List" = X,
page "Hist. Inventory Trx." = X,
page "Hist. Inventory Trx. Headers" = X,
page "Hist. Inventory Trx. Lines" = X,
page "Hist. Payables Document" = X,
page "Hist. Payables Documents" = X,
page "Hist. Purchase Recv." = X,
page "Hist. Purchase Recv. Headers" = X,
page "Hist. Purchase Recv. Lines" = X,
page "Hist. Receivables Document" = X,
page "Hist. Receivables Documents" = X,
page "Hist. Sales Trx." = X,
page "Hist. Sales Trx. Headers" = X,
page "Hist. Sales Trx. Lines" = X,
page "Hist. Migration Step Status" = X,
page "Hist. Payables Apply" = X,
page "Hist. Payables Apply List" = X,
page "Hist. Payables Document List" = X,
page "Hist. Receivables Apply" = X,
page "Hist. Receivables Apply List" = X,
page "Hist. Recv. Document List" = X;
page "Hist. G/L Account List" = X,
page "Hist. Inventory Trx." = X,
page "Hist. Inventory Trx. Headers" = X,
page "Hist. Inventory Trx. Lines" = X,
page "Hist. Payables Document" = X,
page "Hist. Payables Documents" = X,
page "Hist. Purchase Recv." = X,
page "Hist. Purchase Recv. Headers" = X,
page "Hist. Purchase Recv. Lines" = X,
page "Hist. Receivables Document" = X,
page "Hist. Receivables Documents" = X,
page "Hist. Sales Trx." = X,
page "Hist. Sales Trx. Headers" = X,
page "Hist. Sales Trx. Lines" = X,
page "Hist. Migration Step Status" = X,
page "Hist. Payables Apply" = X,
page "Hist. Payables Apply List" = X,
page "Hist. Payables Document List" = X,
page "Hist. Receivables Apply" = X,
page "Hist. Receivables Apply List" = X,
page "Hist. Recv. Document List" = X,
tabledata "Hist. G/L Account" = RIMD,
tabledata "Hist. Gen. Journal Line" = RIMD,
tabledata "Hist. Inventory Trx. Header" = RIMD,
tabledata "Hist. Inventory Trx. Line" = RIMD,
tabledata "Hist. Invt. Trx. SerialLot" = RIMD,
tabledata "Hist. Migration Current Status" = RIMD,
tabledata "Hist. Migration Step Status" = RIMD,
tabledata "Hist. Payables Apply" = RIMD,
tabledata "Hist. Payables Document" = RIMD,
tabledata "Hist. Purchase Recv. Header" = RIMD,
tabledata "Hist. Purchase Recv. Line" = RIMD,
tabledata "Hist. Receivables Apply" = RIMD,
tabledata "Hist. Receivables Document" = RIMD,
tabledata "Hist. Recv. Trx. SerialLot" = RIMD,
tabledata "Hist. Sales Trx. Header" = RIMD,
tabledata "Hist. Sales Trx. Line" = RIMD,
table "Hist. G/L Account" = X,
table "Hist. Gen. Journal Line" = X,
table "Hist. Inventory Trx. Header" = X,
table "Hist. Inventory Trx. Line" = X,
table "Hist. Invt. Trx. SerialLot" = X,
table "Hist. Migration Current Status" = X,
table "Hist. Migration Step Status" = X,
table "Hist. Payables Apply" = X,
table "Hist. Payables Document" = X,
table "Hist. Purchase Recv. Header" = X,
table "Hist. Purchase Recv. Line" = X,
table "Hist. Receivables Apply" = X,
table "Hist. Receivables Document" = X,
table "Hist. Recv. Trx. SerialLot" = X,
table "Hist. Sales Trx. Header" = X,
table "Hist. Sales Trx. Line" = X,
codeunit "Hist. Migration Status Mgmt." = X,
codeunit "Hist. Page Navigation Handler" = X,
page "Hist. Invt. Trx. SerialLot" = X,
page "Hist. Invt. Trx. SerlLot. List" = X,
page "Hist. Recv. Trx. SerialLot" = X,
page "Hist. Recv. Trx. SerlLot. List" = X;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Microsoft.DataMigration.GP.HistoricalData;

using System.Security.AccessControl;

permissionsetextension 40901 "D365 Full Access Ext." extends "D365 FULL ACCESS"
{
Permissions = tabledata "Hist. Gen. Journal Line" = RIMD,
tabledata "Hist. G/L Account" = RIMD,
tabledata "Hist. Sales Trx. Header" = RIMD,
tabledata "Hist. Sales Trx. Line" = RIMD,
tabledata "Hist. Receivables Document" = RIMD,
tabledata "Hist. Payables Document" = RIMD,
tabledata "Hist. Inventory Trx. Header" = RIMD,
tabledata "Hist. Inventory Trx. Line" = RIMD,
tabledata "Hist. Purchase Recv. Header" = RIMD,
tabledata "Hist. Purchase Recv. Line" = RIMD,
tabledata "Hist. Migration Step Status" = RIMD,
tabledata "Hist. Migration Current Status" = RIMD,
tabledata "Hist. Payables Apply" = RIMD,
tabledata "Hist. Receivables Apply" = RIMD,
tabledata "Hist. Invt. Trx. SerialLot" = RIMD,
tabledata "Hist. Recv. Trx. SerialLot" = RIMD;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ permissionsetextension 40900 "D365 Basic Ext." extends "D365 BASIC"
tabledata "Hist. Migration Step Status" = R,
tabledata "Hist. Migration Current Status" = R,
tabledata "Hist. Payables Apply" = R,
tabledata "Hist. Receivables Apply" = R;
tabledata "Hist. Receivables Apply" = R,
tabledata "Hist. Invt. Trx. SerialLot" = R,
tabledata "Hist. Recv. Trx. SerialLot" = R;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,25 @@ codeunit 40902 "Hist. Migration Status Mgmt."
HistInventoryTrxLine: Record "Hist. Inventory Trx. Line";
HistPurchaseRecvHeader: Record "Hist. Purchase Recv. Header";
HistPurchaseRecvLine: Record "Hist. Purchase Recv. Line";
HistPayablesApply: Record "Hist. Payables Apply";
HistReceivablesApply: Record "Hist. Receivables Apply";
HistInvtTrxSerialLot: Record "Hist. Invt. Trx. SerialLot";
HistRecvTrxSerialLot: Record "Hist. Recv. Trx. SerialLot";
begin
UpdateStepStatus("Hist. Migration Step Type"::"Resetting Data", false);

if not HistRecvTrxSerialLot.IsEmpty() then
BatchDeleteAll(Database::"Hist. Recv. Trx. SerialLot", HistRecvTrxSerialLot.FieldNo(HistRecvTrxSerialLot."Primary Key"));

if not HistInvtTrxSerialLot.IsEmpty() then
BatchDeleteAll(Database::"Hist. Invt. Trx. SerialLot", HistInvtTrxSerialLot.FieldNo(HistInvtTrxSerialLot."Primary Key"));

if not HistReceivablesApply.IsEmpty() then
BatchDeleteAll(Database::"Hist. Receivables Apply", HistReceivablesApply.FieldNo(HistReceivablesApply."Primary Key"));

if not HistPayablesApply.IsEmpty() then
BatchDeleteAll(Database::"Hist. Payables Apply", HistPayablesApply.FieldNo(HistPayablesApply."Primary Key"));

if not HistPurchaseRecvLine.IsEmpty() then
BatchDeleteAll(Database::"Hist. Purchase Recv. Line", HistPurchaseRecvLine.FieldNo(HistPurchaseRecvLine."Primary Key"));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Microsoft.DataMigration.GP.HistoricalData;

enum 40908 "Hist. Inventory Qty. Type"
{
value(0; Unknown) { Caption = 'Unknown'; }
value(1; "On Hand") { Caption = 'On Hand'; }
value(2; Returned) { Caption = 'Returned'; }
value(3; "In Use") { Caption = 'In Use'; }
value(4; "In Service") { Caption = 'In Service'; }
value(5; Damaged) { Caption = 'Damaged'; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ namespace Microsoft.DataMigration.GP.HistoricalData;

page 41011 "Hist. Inventory Trx. Lines"
{
ApplicationArea = All;
UsageCategory = None;
Caption = 'Historical Inventory Trx. Lines';
PageType = ListPart;
Editable = false;
Expand Down Expand Up @@ -36,6 +38,14 @@ page 41011 "Hist. Inventory Trx. Lines"
{
ApplicationArea = All;
ToolTip = 'Specifies the value of the Quantity field.';

trigger OnDrillDown()
var
HistInvtTrxSerlLotList: Page "Hist. Invt. Trx. SerlLot. List";
begin
HistInvtTrxSerlLotList.SetFilterInventoryTrxLine(Rec);
HistInvtTrxSerlLotList.Run();
end;
}
field("Unit Cost"; Rec."Unit Cost")
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
namespace Microsoft.DataMigration.GP.HistoricalData;

page 41029 "Hist. Invt. Trx. SerialLot"
{
Caption = 'Historical Inventory Transaction Serial/Lot Detail';
PageType = Card;
ApplicationArea = All;
UsageCategory = None;
Editable = false;
DeleteAllowed = false;
InsertAllowed = false;
ModifyAllowed = false;
SourceTable = "Hist. Invt. Trx. SerialLot";
DataCaptionExpression = DataCaptionExpressionTxt;

layout
{
area(content)
{
group(General)
{
Caption = 'General';

field("Serial/Lot Number"; Rec."Serial/Lot Number")
{
ToolTip = 'Specifies the value of the Serial/Lot Number field.';
}
field("Serial/Lot Qty."; Rec."Serial/Lot Qty.")
{
ToolTip = 'Specifies the value of the Serial/Lot Qty. field.';
}
field("Item No."; Rec."Item No.")
{
ToolTip = 'Specifies the value of the Item No. field.';
}
field("Document No."; Rec."Document No.")
{
ToolTip = 'Specifies the value of the Document No. field.';
}
field("Document Type"; Rec."Document Type")
{
ToolTip = 'Specifies the value of the Document Type field.';
}
field("Line Sequence Number"; Rec."Line Sequence Number")
{
ToolTip = 'Specifies the value of the Line Sequence Number field.';
}
field("Serial/Lot Seq. Number"; Rec."Serial/Lot Seq. Number")
{
ToolTip = 'Specifies the value of the Serial/Lot Seq. Number field.';
}
field("From Bin"; Rec."From Bin")
{
ToolTip = 'Specifies the value of the From Bin field.';
}
field("To Bin"; Rec."To Bin")
{
ToolTip = 'Specifies the value of the To Bin field.';
}
field("Manufacture Date"; Rec."Manufacture Date")
{
ToolTip = 'Specifies the value of the Manufacture Date field.';
}
field("Expiration Date"; Rec."Expiration Date")
{
ToolTip = 'Specifies the value of the Expiration Date field.';
}
field("Audit Code"; Rec."Audit Code")
{
ToolTip = 'Specifies the value of the Audit Code field.';
}
}
}
}

trigger OnAfterGetCurrRecord()
begin
DataCaptionExpressionTxt := Rec."Item No." + ' - ' + Rec."Serial/Lot Number";
end;

var
DataCaptionExpressionTxt: Text;
}
Loading

0 comments on commit 65f76c1

Please sign in to comment.