web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to attach dimension combination with Dimension SET ID in NAV 2017

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to copy the behaviour of Dimensions in Sales Line. If you run table sales line and change the dimensions then based on the dimensions combinations the Dimension SET ID field is updated in real time with new or existing Dimension SET ID.

I want to implement same functionality in custom PAGE/TABLE?

Thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brad_P Profile Picture
    1,549 on at

    Hi,

    Codeunit 408 DimensionManagement has the functions that are needed to work with dimensions.

    There is a function ShowDimensionSet(DimSetID : Integer;NewCaption : Text[250]) that will display the entries for a DimSetID.

    LookupDimValueCode(FieldNumber : Integer;VAR ShortcutDimCode : Code[20]) allows you to see a specific value for a shortcut field. 

    There are several other functions that make working with dimensions easier.

  • Community Member Profile Picture
    on at

    Lets say I have following three fileds on my custom page, Please see the Table 480 from below

    Dimension SET ID                             SHORTCUT DIMENSION 1                    SHORTCUT DIMENSION 2

    11                                                                    VALUE 1                                                    VALUE 2

    NOW if I change SHORTCUT DIMENSION 1 to VALUE 2 and SHORTCUT Dimension 2 to VALUE 4, then Dimension SET ID should be 13 instead of 11. I just dont understand how/where in sales line table they are updating Dimension SET ID Or How I can do in my custom page/table?

    Dimension SET Entry TABLE

    11                                                                    VALUE 1                                                    VALUE 2

    12                                                                    VALUE 2                                                    VALUE 3

    13                                                                    VALUE 2                                                    VALUE 4

    Thanks

  • Verified answer
    Brad_P Profile Picture
    1,549 on at

    The dimension management codeunit has a function:

    ValidateShortcutDimValues(FieldNumber,ShortcutDimCode,DimSetID)

    You pass in the "shortcut code", the dimension code for that shortcut and the existing dim set id.

    The dim set id will be changed to be the new id with the change.

    In the sales line they pass in the line field which gets updated after the function "changes" the dimension code.

  • Community Member Profile Picture
    on at

    Thank you so much!! Brad_P

  • Brad_P Profile Picture
    1,549 on at

    You're welcome.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans