CreateDim for new default dimension

fjgilliefjgillie Member Posts: 17
Now I want to add a new customized function into NAV 4.0 SP1, that is, 1) define one default dimension for Location, 2) If I select a location in SO/PO or Item Journal Line, the default Location dimension will be copied to the order’s document dimension or the journal line dimension. And then once it is posted, they will go to posted document dimension or ledger entry dimension.

I notice there are some relevant function or codeunit, not quite sure how to do the customization.

1) Table 36 Sales Header have a function named CreateDim.
CreateDim(
DATABASE::"Salesperson/Purchaser","Salesperson Code",
DATABASE::Customer,"Bill-to Customer No.",
DATABASE::Job,"Job No.",
DATABASE::Campaign,"Campaign No.",
DATABASE::"Responsibility Center","Responsibility Center",
DATABASE::"Customer Template","Bill-to Customer Template Code");

So I think I may add the similar function CreateDim( DATABASE::"Location","Location Code",….) in the table

2) Codeunit 408 DimensionManagement may also be customized. I change the function SetupObjectNoList and add Table Location into TableIDArray().


Besides the above change, I did nothing else. But it doesn’t work as expected. Do you guys have the experience to add the new default dimension like that? Thanks for your sharing experience and know ledge. Thanks very much!

Comments

Sign In or Register to comment.