Design Details: Code Examples of Changed Patterns in Modifications
Artigo
This topic provides code examples to show changed patterns in dimension code modification and migration for five different scenarios. It compares the code examples in earlier versions to the code examples in Microsoft Dynamics NAV 2015.
Posting a Journal Line
Key changes are listed as follows:
Journal line dimension tables are removed.
A dimension set ID is created in the Dimension Set ID field.
Earlier Versions
Microsoft Dynamics NAV 2015
ResJnlLine."Qty. per Unit of Measure" :=
SalesLine."Qty. per Unit of Measure";
TempJnlLineDim.DELETEALL;
TempDocDim.RESET;
TempDocDim.SETRANGE(
"Table ID",DATABASE::"Sales Line");
TempDocDim.SETRANGE(
"Line No.",SalesLine."Line No.");
DimMgt.CopyDocDimToJnlLineDim(
TempDocDim,TempJnlLineDim);
ResJnlPostLine.RunWithCheck(
ResJnlLine,TempJnlLineDim);
ResJnlLine."Qty. per Unit of Measure" :=
SalesLine."Qty. per Unit of Measure";
ResJnlLine."Dimension Set ID" :=
SalesLine." Dimension Set ID ";
ResJnlPostLine.Run(ResJnlLine);
Posting a Document
When you post a document in Microsoft Dynamics NAV 2015, you no longer have to copy the document dimensions.