Setup and How-Tos re: Dimensions in NAV2016..

Standard

Recently I’ve been asked to explain the concept of dimension in NAV and while I managed to come up quickly with an answer I wanted to spend some time researching the topic so that next time I need to offer a similar explanation my answer will sound more academic, plus I’ll have a link to refer to 🙂

According to msdn, “A dimension is data that you can add to an entry as a kind of marker so that the program can group entries with similar characteristics and easily retrieve these groups for analysis purposes.”.

A few characteristics of dimensions:

  • can be applied to documents and journals
  • dimensions have dimension values, for example we can set a dimension AREA with 3 dimension values: Europe, America, Africa.
  • used to create extracts of financial statements for statistics and analysis. In creating these statistics we can use more than one dimension, for example we can look at sales by the following dimensions AREA and DEPARTMENT.

There are two types of dimensions I want to cover here: global dimensions and shortcut dimensions. Additionally, there are budget dimensions that can be defined at the moment when you generate a new budget.

Both, global dimensions as well as shortcut dimensions can be set up for the company in the General Ledger Setup. There are maximum 2 global dimensions and maximum 8 shortcut dimensions. NAV defines the first two shortcut dimensions the same with the global dimensions.

Global dimensions are available for input across  the system in tables like 15 “G/L Account”, 18 Customer, 23 Vendor or in ledger entries tables like: 17 “G/L Entries”, 21 “Cust. Ledger Entries” and 25 “Vend. Ledger Entries” (Fields 23,24). Because Global Dimensions are being part of the core system they can be used in filtering ledger entries, filtering in the reports, account schedules or batch jobs.

Shortcut dimensions(set up initially in the General Ledger Setup) will be available at the document level, or at the journal lines level. On each line of the document(sale or purchase) or journal line add the column with a name(code) that was designated in general ledger setup as shortcut dimension and assign to it one of the available dimension values. E.g. if I have defined Global Dimension 1 as DEPARTMENT, I’m expecting to have in the General Ledger Setup the “Shortcut Dimension 1 Code” as DEPARTMENT and when I create a Purchase Invoice, on the lines, to have available a field “Department Code”.

To create dimensions, use Page Dimensions and enter or modify dimensions.

To create values for each dimensions, on the same page go to Navigate Tab, and launch action “Dimension Values”. To assign default values for dimensions, on the same Page (Dimensions) use action “Account Type Default Dim.”. If you dont’ want to specify a default dimension value code, but you want to have it on each ledger entry, set the value of “Value Posting” field to “Code Mandatory”. This way you ensure that no General Journal Line or document will be posted without a value for the specific dimension.

In a future blog I will dive into the technical design of dimensions covering notions such as dimension sets, dimension set entries, search trees and a few notes on performance improvements compared to older dimension design.

Thank you for reading, sharing, commenting … Much appreciated!

Original blog here.

Advertisements

How to use CAPTIONCLASSTRANSLATE in Dynamics NAV

Standard

Not long ago I stumbled upon a question on the popular NAV forum dynamicsuser.net. The question was “What is the use of CAPTIONCLASSTRANSLATE command in NAV?”.
There was only one answer coming from one of the most influential experts in the NAV world, Luc Van Vugt, but his answer intrigued me even more. As msdn was not very helpful, I started digging into this function use.

First, I wanted to see where is used in standard NAV 2017 in the Cronus database. To find all occurrences of CAPTIONCLASSTRANSLATE in standard NAV I used the Object Manager produced by idyn , a NAV AddOn for managing C/AL code. For my readers that do not have access to this development tool, export all objects to a text file and search in the file for “CAPTIONCLASSTRANSLATE”.

std-nav-use

First occurrence was in report 13, VAT register:

rep13

The report is using the command CAPTIONCLASSTRANSLATE to populate the value of a control(VATEntryClosedCaption) with the caption of “VAT Entry”.Closed field.

Similarly, CAPTIONCLASSTRANSLATE is used in report 22 “No. Series Check”, report 35 “Document Entries”, report 122 “Reminder – Test”, report 123 “Finance Charge Memo – Test”, report 1403 “Bank Account Register”, report 5900 “Service Order”.

A more intriguing way of using the command CAPTIONCLASSTRANSLATE is found in the other objects  as following:

employeelistreport

As we can see above, CAPTIONCLASSTRANSLATE receives a string parameter consisting of three sub-strings separated by two commas.

CAPTIONCLASSTRANSLATE(‘i,j,k’)

By investigating the code in Codeunit 42 “CaptionManagement” and Codeunit 57 “Document Totals” I could draw the following conclusions:

If i = 1 then CAPTIONCLASSTRANSLATE will output Dimension codes.

If j = 1 then CAPTIONCLASSTRANSLATE will output Global Dimensions code.

If k = 1 (i=1,j=1) then CAPTIONCLASSTRANSLATE will output “Global Dimension 1 Code”

If k = 2 (i=1,j=1) then CAPTIONCLASSTRANSLATE will output “Global Dimension 2 Code”

If i = 1 and j = 2 then CAPTIONCLASSTRANSLATE will output Shortcut Dimension Codes(for k=1..8).

dimensioncodes

For printing field captions that have (LCY) in caption use i = 101.

For example to display Amount(LCY) use CAPTIONCLASSTRANSLATE like below:

lcy

To display captions of amount fields that contain the text “Incl. VAT” or “Excl. VAT” use CAPTIONCLASSTRANSLATE with i =2 and j = 0 (to display Excl. VAT) or j = 1 (to display Incl. VAT) as in the examples below:

vat

All examples of CAPTIONCLASSTRANSLATE found in NAV standard were in reports and used to display captions in the table headers or group totals in report layouts.