Showing posts with label of. Show all posts
Showing posts with label of. Show all posts

Friday, 30 October 2015

Design Overview of Dimension handling in Navision 2016

Hold on,

Way of handling Dimension have changed from Navision 2009 not a new concept. Till now everyone is aware of this technical change, but still to keep handy reference today I decided to share the same with community, which can help for new comers in this industry.

Detailed technical insight into the concepts and principles that are used to redesign the dimension entry storing and posting feature in Microsoft Dynamics NAV 2016. Helpful when upgrading from earlier version to 2009.

Dimension Sets

A dimension set is a unique combination of dimension values. It is stored as dimension set entries in the database. Each dimension set entry represents a single dimension value.

The dimension set is identified by a common dimension set ID that is assigned to each dimension set entry that belongs to the dimension set.

Dimension Set Entries

Dimension sets are stored in the Dimension Set Entry table as dimension set entries with the same dimension set ID.

When you add, edit and close the Edit Dimension Set Entries window, a check is performed to see whether the combination of dimension values exists as a dimension set in the table.

If the combination occurs in the table, then the corresponding dimension set ID is assigned to the journal line, document header, or document line.

Otherwise, a new dimension set is added to the table, and the new dimension set ID is assigned to the journal line, document header, or document line.
Performance Improvement
By storing dimension sets once in the database, database space is preserved, and overall performance is improved.

Searching for Dimension Combinations

Building Search Tree
Table 481 Dimension Set Tree Node is used when Microsoft Dynamics NAV evaluates whether a set of dimensions already exists in table 480 Dimension Set Entry table.

The evaluation is performed by recursively traversing the search tree starting at the top level numbered 0.

The top level 0 represents a dimension set with no dimension set entries. The children of this dimension set represent dimension sets with only one dimension set entry.

The children of these dimension sets represent dimension sets with two children, and so on.

Finding Dimension Set ID

At a conceptual level, Parent ID, Dimension, and Dimension Value, in the search tree, are combined and used as the primary key because Microsoft Dynamics NAV traverses the tree in the same order as the dimension entries.

The GET function (record) is used to search for dimension set ID.

DimSet."Parent ID" := 0;  // 'root'

IF UserDim.FINDSET THEN

REPEAT

DimSet.GET(DimSet."Parent ID",UserDim.DimCode,UserDim.DimValueCode);

UNTIL UserDim.NEXT = 0;

EXIT(DimSet.ID);

However, to preserve the ability of Microsoft Dynamics NAV to rename a dimension and dimension value, table 348 Dimension Value is extended with an integer field of Dimension Value ID.

This table converts the field pair Dimension and Dimension Value to an integer value.

When you rename the dimension and dimension value, the integer value is not changed.

DimSet."Parent ID" := 0;  // 'root'IF UserDim.FINDSET THEN  REPEAT      DimSet.GET(DimSet.ParentID,UserDim."Dimension Value ID");  UNTIL UserDim.NEXT = 0;EXIT(DimSet.ID);

Table Structure

New Tables

Three new tables have been designed to manage dimension set entries.

Table 480 Dimension Set Entry
Table 480 Dimension Set Entry is a new table. You cannot change this table. After data has been written to the table, you cannot delete or edit it.

Deleting data requires that you check against all occurrences of the dimension set ID in the entire database, including partner solutions.













































Field No. Field Name Data Type Comment
1IDInteger>0.0 is reserved for the empty dimension set. References field 3 in table 481.
2Dimension CodeCode 20Table relation to table 348.
3Dimension Value CodeCode 20Table relation to table 349.
4Dimension Value IDIntegerReferences field 12 in table 349. It is the secondary key that is used when traversing table 481.
5Dimension NameText 30CalcField. Lookup to table 348.
6Dimension Value NameText 30CalcField. Lookup to table 349.

Table 481 Dimension Set Tree Node


Table 481 Dimension Set Tree Node is a new table. You cannot change this table.

It is used to search for a dimension set. If the dimension set is not found, a new set is created.

































Field No. Field Name Data Type Comment
1Parent Dimension Set IDInteger0 for top level node.
2Dimension Value IDIntegerTable relation to field 12 in table 349.
3Dimension Set IDIntegerAutoIncrement. Used in field 1 in table 480.
4In UseBooleanFalse if not in use.

Table 482 Reclas. Dimension Set Buffer
Table 482 Reclas. Dimension Set Buffer is a new table.

The table is used to edit a dimension set ID.

It is required when you edit a dimension value code and a new dimension value code, for example, in the Item Reclas. Journal table.

























































Field No. Field Name Data Type Comment
1Dimension CodeCode 20Table relation to table 348.
2Dimension Value CodeCode 20Table relation to table 349.
3Dimension Value IDIntegerReferences field 12 in table 349.
4New Dimension Value CodeCode 20Table relation to table 349.
5New Dimension Value IDIntegerReferences field 12 in table 349.
6Dimension NameText 30CalcField. Lookup to table 348.
7Dimension Value NameText 30CalcField. Lookup to table 349.
8New Dimension Value NameText 30CalcField. Lookup to table 349.

Modified Tables
All transaction and budget tables have been modified to manage dimension set entries.

Changes to Transaction and Budget Tables
A new field has been added to all transaction and budget tables.















Field No. Field Name Data Type Comment
480Dimension Set IDIntegerReferences field 1 in table 480.

Changes to Table 83 Item Journal Line
Two new fields have been added to table 83 Item Journal Line.





















Field No. Field Name Data Type Comment
480Dimension Set IDIntegerReferences field 1 in table 480.
481New Dimension Set IDIntegerReferences field 1 in table 480.

Changes to Table 349 Dimension Value
A new field has been added to table 349 Dimension Value.















Field No. Field Name Data Type Comment
12Dimension Value IDIntegerAutoIncrement. Used for references in table 480 and table 481.

Tables That Get New Field 480 Dimension Set ID
A new field, 480 Dimension Set ID, has been added to the following tables.

For the tables that store posted data, the field only provides a non-editable display of dimensions, which is marked as Drill-down.

For the tables that store working documents, the field is editable. The buffer tables that are used internally do not need editable or non-editable capabilities.

The 480 field is non-editable in the following tables











































































































































































































Table No. Table Name
17G/L Entry
21Cust. Ledger Entry
25Vendor Ledger Entry
32Item Ledger Entry
110Sales Shipment Header
111Sales Shipment Line
112Sales Invoice Header
113Sales Invoice Line
114Sales Cr.Memo Header
115Sales Cr.Memo Line
120Purch. Rcpt. Header
121Purch. Rcpt. Line
122Purch. Inv. Header
123Purch. Inv. Line
124Purch. Cr. Memo Hdr.
125Purch. Cr. Memo Line
169Job Ledger Entry
203Res. Ledger Entry
271Bank Account Ledger Entry
281Phys. Inventory Ledger Entry
297Issued Reminder Header
304Issued Fin. Charge Memo Header
5107Sales Header Archive
5108Sales Line Archive
5109Purchase Header Archive
5110Purchase Line Archive
5601FA Ledger Entry
5625Maintenance Ledger Entry
5629Ins. Coverage Ledger Entry
5744Transfer Shipment Header
5745Transfer Shipment Line
5746Transfer Receipt Header
5747Transfer Receipt Line
5802Value Entry
5832Capacity Ledger Entry
5907Service Ledger Entry
5908Service Header
5933Service Order Posting Buffer
5970Filed Service Contract Header
5990Service Shipment Header
5991Service Shipment Line
5992Service Invoice Header
5993Service Invoice Line
5994Service Cr. Memo Header
5995Service Cr. Memo Line
6650Return Shipment Header
6651Return Shipment Line
6660Return Receipt Header
6661Return Receipt Line

The 480 field is editable in the following tables



























































































































Table No. Table Name
36Sales Header
37Sales Line
38Purchase Header
39Purchase Line
81Gen. Journal Line
83Item Journal Line
89BOM Journal Line
96G/L Budget Entry
207Res. Journal Line
210Job Journal Line
221Gen. Jnl. Allocation
246Requisition Line
295Reminder Header
302Finance Charge Memo Header
5405Production Order
5406Prod. Order Line
5407Prod. Order Component
5615FA Allocation
5621FA Journal Line
5635Insurance Journal Line
5740Transfer Header
5741Transfer Line
5900Service Header
5901Service Item Line
5902Service Line
5965Service Contract Header
5997Standard Service Line
7134Item Budget Entry
99000829Planning Component

The 480 field has been added to the following buffer tables.



































Table No. Table Name
49Invoice Post. Buffer
212Job Posting Buffer
372Payment Buffer
382CV Ledger Entry Buffer
461Prepayment Inv. Line Buffer
5637FA G/L Posting Buffer
7136Item Budget Buffer

Codeunit 408 Dimension Management
Codeunit 408 Dimension Management is a function library that handles common tasks that are related to dimensions, such as copying from one table to another or from one document to another.

Many functions are deleted because there is no need for copying between dimension tables at the other hand many functions are modified.

Modified Functions























Function Name Modification Description
CheckDimSetIDCombNew function that substitutes the other check functions and takes a Dimension Set ID as an argument instead of a dimension table.
CheckDimSetIDComb

CheckDocDimComb

CheckServContractDimComb

CheckDimBuffer

CheckDimComb

CheckDimValueComb
Delete. All usage should be changed to CheckDimSetIDComb.
GetDefaultDimModify to return an integer Dimension Set ID instead of a set of records.
CopyJnlLineDimToICJnlDim

CopyICJnlDimToJnlLineDim

CopyDocDimtoICDocDim

CopyICDocDimtoICDocDim
Modify to work with DimSetID -> ICJnlLineDim

Deleted Functions

Functions that are deleted from codeunit 408 in connection with the Dimension Set Entries feature are listed below.

During the upgrade of application code from Microsoft Dynamics NAV 2009 or earlier versions to Microsoft Dynamics NAV 2016, the following functions are not available in Microsoft Dynamics NAV 2016.

If you have customizations that use one or more of the functions, you must upgrade that code accordingly.

InsertJnlLineDim

UpdateJnlLineDefaultDim

GetJnlLineDefaultDim

GetPreviousDocDefaultDim

GetPreviousProdDocDefaultDim

InsertDocDim

UpdateDocDefaultDim

ExtractDocDefaultDim

InsertProdDocDim

UpdateProdDocDefaultDim

InsertServContractDim

UpdateServcontractDim

UpdateDefaultDimNewDimValue

GetDocDim

GetProdDocDim

TypeToTableID1

TypeToTableID2

TypeToTableID3

TypeToTableID4

TypeToTableID5

DeleteJnlLineDim

DeleteDocDim

DeletePostedDocDim

DeleteProdDocDim

DeleteServContractDim

ShowJnlLineDim

SaveJnlLineDim

ShowJnlLineNewDim

SaveJnlLineNewDim

ShowDocDim

SaveDocDim

ShowProdDocDim

SaveProdDocDim

ShowTempDim

SaveTempDim

ShowTempNewDim

SaveTempNewDim

SaveServContractDim

MoveJnlLineDimToLedgEntryDim

MoveDocDimToPostedDocDim

MoveOneDocDimToPostedDocDim

MoveLedgEntryDimToJnlLineDim

MoveDimBufToJnlLineDim

MoveDimBufToLedgEntryDim

MoveDimBufToPostedDocDim

MoveDimBufToGLBudgetDim

CopyJnlLineDimToJnlLineDim

CopyLedgEntryDimToJnlLineDim

CopyDocDimToDocDim

CopyPostedDocDimToPostedDocDim

CopyDocDimToJnlLineDim

CopyDimBufToJnlLineDim

CopyDimBufToDocDim

CopySCDimToDocDim

MoveDocDimToLedgEntryDim

MoveDocDimToDocDim

MoveDocDimArchvToDocDim

MoveLedgEntryDimToDocDim

MoveProdDocDimToProdDocDim

MoveJnlLineDimToProdDocDim

MoveJnlLineDimToDocDim

MoveJnlLineDimToJnlLineDim

CopyLedgEntryDimToLedgEntryDim

MoveTempFromDimToTempToDim

TransferTempToDimToDocDim

MoveJnlLineDimToBuf

CopyICJnlDimToICJnlDim

TestDimValue

TestNewDimValue

MoveDimBufToItemBudgetDim. (Delete because the ItemBudgetDim Table is deleted.

GetServContractDim

MoveTempDimToBuf

UpdateSCInvLineDim

CopyJnlLineDimToBuffer

UpdateDocDefaultDim2

Code Examples of Changed Patterns in Modifications

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.


Old Code

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);

New Code

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 2016, you no longer have to copy the document dimensions.

Old Code

DimMgt.MoveOneDocDimToPostedDocDim(

TempDocDim,DATABASE::"Sales Line",

"Document Type",

"No.",

SalesShptLine."Line No.",

DATABASE::"Sales Shipment Line",

SalesShptHeader."No.");

New Code

SalesShptLine."Dimension Set ID”  := SalesLine."Dimension Set ID”
Editing Dimensions from a Document
You can edit dimensions from a document. For example, you can edit a sales order line.

Old Code

Table 37, function ShowDimensions:

TESTFIELD("Document No.");

TESTFIELD("Line No.");

DocDim.SETRANGE("Table ID",DATABASE::"Sales Line");

DocDim.SETRANGE("Document Type","Document Type");

DocDim.SETRANGE("Document No.","Document No.");

DocDim.SETRANGE("Line No.","Line No.");

DocDimensions.SETTABLEVIEW(DocDim);

DocDimensions.RUNMODAL;

New Code

Table 37, function ShowDimensions:

"Dimension ID" := DimSetEntry.EditDimensionSet( "Dimension ID");
Showing Dimensions from Posted Entries
You can show dimensions from posted entries, such as sales shipment lines.

Old Code

Table 111, function ShowDimensions:

TESTFIELD("No.");

TESTFIELD("Line No.");

PostedDocDim.SETRANGE("Table ID",DATABASE::"Sales Shipment Line");

PostedDocDim.SETRANGE("Document No.","Document No.");

PostedDocDim.SETRANGE("Line No.","Line No.");

PostedDocDimensions.SETTABLEVIEW(PostedDocDim);

PostedDocDimensions.RUNMODAL;

New Code

Table 111, function ShowDimensions:

DimSetEntry.ShowDimensionSet("Dimension ID");
Getting Default Dimensions for a Document
You can get default dimensions for a document, such as a sales order line.

Old Code

Table 37, function CreateDim()

SourceCodeSetup.GET;

TableID[1] := Type1;

No[1] := No1;

TableID[2] := Type2;

No[2] := No2;

TableID[3] := Type3;

No[3] := No3;

"Shortcut Dimension 1 Code" := '';

"Shortcut Dimension 2 Code" := '';

DimMgt.GetPreviousDocDefaultDim( DATABASE::"Sales Header","Document Type",

"Document No.",0, DATABASE::Customer, "Shortcut Dimension 1 Code",

"Shortcut Dimension 2 Code");

DimMgt.GetDefaultDim(TableID,No,SourceCodeSetup.Sales,

"Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code");

IF "Line No." <> 0 THEN

DimMgt.UpdateDocDefaultDim( DATABASE::"Sales Line","Document Type",

"Document No.","Line No.", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code");

New Code

Table 37, function CreateDim()

SourceCodeSetup.GET;

TableID[1] := Type1;

No[1] := No1;

TableID[2] := Type2;

No[2] := No2;

TableID[3] := Type3;

No[3] := No3;

"Shortcut Dimension 1 Code" := '';

"Shortcut Dimension 2 Code" := '';

GetSalesHeader;

"Dimension ID" :=  DimMgt.GetDefaultDimID(

TableID,No,SourceCodeSetup.Sales, "Shortcut Dimension 1 Code",

"Shortcut Dimension 2 Code", SalesHeader."Dimension ID", DATABASE::"Sales Header");

Wednesday, 30 September 2015

Basics of Power Pivot for Excel – 2013

Dear friends, I have published couple of posts on this topic. I will be adding more advanced features and details related to this in my upcoming posts.

For your ready reference below I present Links to those posts.

PowerPivot for Excel

Start the Power Pivot in Microsoft Excel add-in

Troubleshooting: Power Pivot Ribbon Disappears

PowerPivot Creating a Data Model in Excel 2013

Adding more tables to the Data Model using Existing Connection – In PowerPivot

Add relationships to Data Model in PowerPivot

How to add Filter for data retrieval in PowerPivot Data model.

Create a calculated column in PowerPivot

Creating My First Report using PowerPivot

In Excel 2013, PowerPivot and Power View are no longer separate add-ins that need to be downloaded and installed. These add-ins are natively included.

PowerPivot in Excel 2013 is functionally very similar to the PowerPivot add-in for Excel 2010.

PowerPivot is an add-in that lets end users gather, store, model, and analyze large amounts of data in Excel. Power View provides intuitive data visualization of PowerPivot models and SQL Server Analysis Services (SSAS) tabular mode databases.

If you're unfamiliar with either PowerPivot or Power View, I encourage you to first review my previous post links provided above to understand the basics.

Some parts of the PowerPivot architecture is embedded inside of Excel 2013.

  • The PowerPivot version in Excel 2013 no longer uses a separate PowerPivot Fields list. Instead, the built-in PivotTable Fields list is used. This means that some capabilities from the Excel 2010 add-in (e.g., searching for fields by name, creation of slicers from the field list, surfacing of column descriptions when hovering over a field) are no longer available.

  • Workbooks with PowerPivot models are no longer limited to 2GB in size in Excel 2013. However, the 2GB limit still applies to workbooks that will be published to SharePoint.

  • In Excel 2013, a refresh of a PivotTable or PivotChart will, by default, initiate a refresh of the underlying data connections in the Data Model. This is very different from Excel 2010, where a PivotTable refresh only re-queries the model. The new refresh behaviour can be changed by clicking Connections on the Data tab, selecting Properties, and clearing the Refresh this connection on Refresh All check box.

  • Stay tuned for more information on this topic. Till then keep practicing & exploring.

  • In Excel 2013, a Power View "report" is a worksheet rather than an .rdlx file. There's no concept of multiple report views. Instead, multiple Power View worksheets can be created within a single Excel workbook.


Stay tuned for more information on this topic. Till then keep practicing & exploring.

Friday, 28 August 2015

Automatic Deployment of Microsoft .NET Framework Interoperability and Control Add-in Assemblies

Microsoft Dynamics NAV 2015 makes it easier for the system administrators to deploy client-side assemblies for .NET Framework interoperability and client control add-ins on computers that are running the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Development Environment.

You can now install the assemblies in the Add-ins folder on the computer that is running Microsoft Dynamics NAV Server. By default, this is the C:\Program Files\Microsoft Dynamics NAV\80\Service\Add-ins folder.

When an operation from the client requires an assembly, Microsoft Dynamics NAV Server automatically deploys the assembly to a temporary folder on the client computer.

For example, if Microsoft Dynamics NAV Windows client opens a page that contains a control add-in, Microsoft Dynamics NAV Server will find the control add-in assembly by name in the Add-ins folder. Then, it deploys the assembly to the client computer in the %TEMP%\Microsoft Dynamics NAV\Add-Ins folder of the user who is running the client. Subsequently, the deployed assembly will be used whenever the page is opened.

Similarly, if the development environment requires a control add-in, for example, when you compile an object, then the control add-in assembly will be deployed by the Microsoft Dynamics NAV Server to the local temporary folder for the current user on the computer that is running the development environment.

Important:

To be deployed, an assembly must comply with the following Microsoft Dynamics NAV Server configuration settings: Chunk Size, Max Upload Size, and Prohibited File Types.

If a .NET Framework interoperability or control add-in assembly is updated and its version number changes, Microsoft Dynamics NAV Server will deploy the updated assembly to the client computer the next time that the client requests the assembly. The updated assembly is put in a subfolder of the %TEMP%\Microsoft Dynamics NAV\Add-Ins folder, where the subfolder has the assembly's version number as its name. This implementation means that you do have to remove the older versions of assemblies that are stored on the client computer.

To support compatibility with earlier version of Microsoft Dynamics NAV, before Microsoft Dynamics NAV Server deploys an assembly to a client, the client looks for the assembly in the local Add-ins folder (for example, C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\Add-ins). If the assembly is not found, then the client will request the assembly from Microsoft Dynamics NAV Server.

Javascript-based client add-ins have been using this deployment technique since Microsoft Dynamics NAV 2013 R2.

Friday, 10 July 2015

List of Cumulative Updates for Microsoft Dynamics NAV 2015 as of July 2015










































































Knowledge Base IDTitleRelease dateBuild no.Local versions included
3075726  (https://support.microsoft.com/kb/3075726/ )Cumulative Update 9 for Microsoft Dynamics NAV 2015July, 201541779AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3069272  (https://support.microsoft.com/kb/3069272/ )Cumulative Update 8 for Microsoft Dynamics NAV 2015June, 201541370AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3058000  (https://support.microsoft.com/kb/3058000/ )Cumulative Update 7 for Microsoft Dynamics NAV 2015May, 201540938AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3052226  (https://support.microsoft.com/kb/3052226/ )Cumulative Update 6 for Microsoft Dynamics NAV 2015April, 201540459AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3039824  (https://support.microsoft.com/kb/3039824/ )Cumulative Update 5 for Microsoft Dynamics NAV 2015March, 201540262AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3035986  (https://support.microsoft.com/kb/3035986/ )Cumulative Update 4 for Microsoft Dynamics NAV 2015February, 201539663AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3024901  (https://support.microsoft.com/kb/3024901/ )Cumulative Update 3 for Microsoft Dynamics NAV 2015January, 201539368AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3020885  (https://support.microsoft.com/kb/3020885/ )Cumulative Update 2 for Microsoft Dynamics NAV 2015December, 201438798AT, AU, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3013215  (https://support.microsoft.com/kb/3013215/ )Cumulative Update 1 for Microsoft Dynamics NAV 2015November, 201438457AT, AU, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK