XMLPORT csv import file Shortcut Dim 3

kenjeskenjes Posts: 72Member

I have a csv file I import through XMLPORT.
In the file is a dimension value, that have to be inserted as ShortCut Dimension 3.
Table : "Job Journal Line"

Can someone help me out here ...




  • kinekine Posts: 12,560Member
    And the problem is?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kenjeskenjes Posts: 72Member
    How to set shortcut dimension 3
    Its not In the job journal Line table
  • rnjbngrnjbng Posts: 66Member
    Go to General ledger setup and first check what is shortcut dimension 3 code and then insert entry into Dimension set entry table for example

    dimset."dimension set id" := whatever the last no. is
    dimset."dimension code" := glsetup."shortcut dimension 3 code"
    dimset."dimension value code" := from your import file.
    dimset."dimension value Id" = if you have any from the file.
    dimset."dimension name := name of the dimension
    if not dimset.insert then

    and you should get the shortcut dimension 3 dimension in...

  • kinekine Posts: 12,560Member
    Do not agree with creating the dimset manually. You should create it through the management codeunit functions. And I am still not sure that this is answer for the request...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kenjeskenjes Posts: 72Member
    To Kine : How to create it through the management codeunit ? :)
  • postsauravpostsaurav Posts: 708Member

    If you inserting line via code then -
    1. Call Validate of the Shortcut Dimension Code Fields (1 & 2) if there is a value for those two.

    2. Once Validated you will get a dimension set ID for the Journal Line.

    3. Call Function -

    Where -
    DimManagment - Variable of Codeunit 409.
    TempDimSetEntry - Temporary Variable of Dimension Set Entry Table.
    DimSetID - Dimension Set of ID of Current Line.

    ** This Function will fill up the Records in The Temporary Record of Dimension Set Entry.

    4. Once Done Add Your Shortcut Dimension 3 Value with a code like below in temp record set -
      TempDimSetEntry."Dimension Code" := DimVal."Dimension Code";
      TempDimSetEntry."Dimension Value Code" := DimVal.Code;
      TempDimSetEntry."Dimension Value ID" := DimVal."Dimension Value ID";
      IF TempDimSetEntry.INSERT THEN;

    5. After That call Function
    DimSetID := DimManagment. GetDimensionSetID(TempDimSetEntry);

    Where -
    DimManagment - Variable of Codeunit 409.

    The Dimension Set ID will be updated and the Line will contain value for Dimension Code 3...

    Let me know if any issues.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?

    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • jarnoldjarnold Posts: 1Member
    Thanks, Saurav. That was an extremely helpful bit of information. As usual, you are appreciated.
Sign In or Register to comment.