How do I correct the dimensions for a posted invoice?

Hi,

For few of the posted invoices, the dimension codes were not imported to the Document Dimension table. As a result of this, the Detailed Trial Balance reports are not showing the revenue from these invoices. Sample Document Dimension data below.

36,Invoice,INV#A60180,“0”,“COMPANY”,“09”

36,Invoice,INV#A60180,“0”,“COSTCENTER”,“NB001”

How do I fix this?

Thanks,

Vinod

Hi Vinod,

Similar issues have been discussed on this website many time, I suggest you search here for “change dimension for posted” or something similar

Following is the link to one of the discussion:

http://dynamicsuser.net/forums/p/19888/90951.aspx#90951

Are you an implementation partner and have developer license, then this can be done by some coding also?

As I understand you have dimensions in the table-fields (Shortcut Dimension x Code) and not in the Dimension-table.

Usually it is not nessasary to do anything with Document Dimensions. Unless you have some reportings using theese dimensions.

But you have to do some coding. Or - if not that many records - do it manually by simply typing the dimension-values into table 355. Remember that dimensions have to be connected to tables “G/L Entry”, “Cust. Ledger Entry”, “Item Ledger Entry”, “Value Entry” and others. Use Navigate to locate entries.

Only thing is that you have to know how and what you are doing. If you don’t - don’t do anything as you may mess everything up.

And remember - a backup first! Perhaps you try this in a work/demo/test-database where an error will be harmless.

Otherwise - pease of cake!


Beware: in some countries it is illegal to change dimensions on postings!

Hi Dhanraj,

I have a developer license. Can you please tell me how to proceed with coding?

Thanks,

Vinod

Hi,

Have you identified all the such wrong posted entries and how many are there?

If it is a small number, then why not you change directly in “Posted Document Dimension” table?

I did the changes to the invoices in Posted Document Dimension table.

But still the reports does not show revenue.

Hi,

Are you talking about Global Dimension 1-2 or Shortcut dimensions only?

If it is Global Dimensions, then these are stored in main tables, rather than subsidiary tables and therefore changes should be made in other tables also which include G/L Entry and corresponding Header and Line tables also.

Which report are you running (Detail Trial Balance)?

These are the Global Dimensions 1 & 2.

Report is Detail Trial Balance.

GD 1&2 are stored BOTH in GL Entry and in Ledger Entry Dim. tables, besides, Navision DOESN’T check if both places ari in sync.

In LED (accessed through LED form) you can change GD values, but they will remain unchanged in GL Entry table…

Shortcut Dims are stored ONLY in LED table, so these can be changed successfully through LED Form, but not GD!

Here is the code I have used, in the G/L Entry table

Global Var:LedgerEntryDim2 = Ledger Entry Dimension

Global Dimension 2 Code - OnValidate()
///================GL Entry Dim update=====================
CLEAR(LedgerEntryDim2);

LedgerEntryDim2.SETFILTER(“Table ID”, ‘%1’, DATABASE::“G/L Entry”);
LedgerEntryDim2.SETFILTER(“Entry No.”, ‘%1’, “Entry No.”);
LedgerEntryDim2.SETFILTER(“Dimension Code”,’%1’,‘PROJECT’);

///MODIFY EXISTING RECORD IN TABLE 355
IF LedgerEntryDim2.FIND(’-’) THEN BEGIN
LedgerEntryDim2.“Dimension Value Code” := “Global Dimension 2 Code”;
LedgerEntryDim2.MODIFY;
END ELSE BEGIN
///INSERT RECORD IN TABLE 355 IF NO PREVIOUS ENTRY FOUND
LedgerEntryDim2.“Table ID” := DATABASE::“G/L Entry”;
LedgerEntryDim2.“Entry No.” := “Entry No.”;
LedgerEntryDim2.“Dimension Code” := ‘PROJECT’;
LedgerEntryDim2.“Dimension Value Code” := “Global Dimension 2 Code”;
LedgerEntryDim2.INSERT;
END;

I have a form that shows the Dimension as the only editable field, I also have a new field to show the original value:

here is the code from the form:

Global Dimension 2 Code - OnValidate()
IF “Global Dimension 2 Code” <> xRec.“Global Dimension 2 Code” THEN BEGIN
IF “Original Project Code” = ‘’ THEN
“Original Project Code” := xRec.“Global Dimension 2 Code”;

CLEAR(LedgerEntryDim2); ///

LedgerEntryDim2.SETFILTER(“Table ID”, ‘%1’, DATABASE::“G/L Entry”);
LedgerEntryDim2.SETFILTER(“Entry No.”, ‘%1’, “Entry No.”);
LedgerEntryDim2.SETFILTER(“Dimension Code”,’%1’,‘PROJECT’);

///MODIFY EXISTING RECORD IN TABLE 355
IF LedgerEntryDim2.FIND(’-’) THEN BEGIN
LedgerEntryDim2.“Dimension Value Code” := “Global Dimension 2 Code”;
LedgerEntryDim2.MODIFY;
END ELSE BEGIN
///INSERT RECORD IN TABLE 355 IF NO PREVIOUS ENTRY FOUND
LedgerEntryDim2.“Table ID” := DATABASE::“G/L Entry”;
LedgerEntryDim2.“Entry No.” := “Entry No.”;
LedgerEntryDim2.“Dimension Code” := ‘PROJECT’;
LedgerEntryDim2.“Dimension Value Code” := “Global Dimension 2 Code”;
LedgerEntryDim2.INSERT;
END;
END;

It is possible to change related tables but is a lot more coding, if the end result is G/L Reports then this will be all that is needed.

Hope this helps,

Colin