Options

How to add automatically a dimension to a transaction?

nuno.silvanuno.silva Member Posts: 29
Hi,
If we always want to add a dimension automatically, to a document? for example if someone creates a sales order, the system automatically add this dimension, later if the user wants to modified the value opens the dimension page and change the value.
We want to add this feature to all documents and journals in NAV. I know I can go on the triggers of each table and call a function that adds the dimension but there is a cleaner way?
thanks in advance for your suggestions.
NS
===============
Nuno Silva

Answers

  • Options
    parmparm Member Posts: 49
    Hi,
    If the dimension is related to Nav Standard default dimensions the problem is solved (get the default dimension for customer when the customer is used).
    If the dimension is a customization you must add code in each entity or document. In this case, instead of changing CreateDim function, think about creating a new function to call after to minimize the impact in upgrades.

    Regards,
    parm
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    nuno.silva wrote: »
    Hi,
    If we always want to add a dimension automatically, to a document? for example if someone creates a sales order, the system automatically add this dimension, later if the user wants to modified the value opens the dimension page and change the value.
    We want to add this feature to all documents and journals in NAV. I know I can go on the triggers of each table and call a function that adds the dimension but there is a cleaner way?
    thanks in advance for your suggestions.
    NS

    Why not just default the dimension on the customer, vendor, and/or items?
  • Options
    einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Also pay attention to the Dimension Priorities where you can define which is the Default Dimension that should have the lead.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • Options
    nuno.silvanuno.silva Member Posts: 29
    Hi,
    It is not related with the default dimensions, but I can solve in the function GetDefaultDimID where I have the ID of the table where I'm writting the default dimensions, and if is the table that i need to add the new dimension just add it.
    thanks guys you didn't solve but get me to the solution
    ===============
    Nuno Silva
  • Options
    KishormKishorm Member Posts: 921
    Hi, not sure if this fits your requirement or not but have a look at Account Type Default Dimensions...

    https://msdn.microsoft.com/en-us/library/hh167859.aspx
Sign In or Register to comment.