SBX - Search With Button

SBX - Forum Post Title

Modify Dimension Set ID for item ledger entry

Microsoft Dynamics NAV Forum

David Tailor asked a question on 29 Apr 2018 8:29 AM
My Badges

Question Status

Verified

Hello,

I want to modify dimension set ID for item ledger entries for items that have been posted with wrong default dimensions.

I did try to import through configuration package on table 32, but it didn't work.

I investigate more and check that NAV write to Physical inventory ledger entry table.

any idea how to do it through configuration package?

or it should be through code?

Regards,

David

Reply

David,

Hi! You cannot do this to any posted table in Nav via RTC and probably a bad idea through code as well. You will need a developer licence to make changes via code. Just bad practice really. I would suggest using journals to create the mis posting of dimensions.

Neil

Reply
David Tailor responded on 30 Apr 2018 3:40 PM
My Badges

Hi Neil,

thank you for your reply.

I agree with you that this is bad for posted transactions, however for huge number of vouchers posted, they need to fill a value for third dimension, missed to be added as default for item card due to bad implementation.

any idea how to add code? and where?

Regards,

David

Reply

David

Apologies for the delay in replying. Will investigate and report back.

Neil

Reply

David

Complicated. In the good old days (yes I am old enough to remember) this was a bit of code to change dimension ledger entry (this would require a codeunit (your licence may not allow you to do this) to allow you to make this change which you would then need to add to your licence etc) but these days you need to (potentially) add a new dimension set to the dimension set entry table and then assign to item ledger entries. Again this will require relevant permissions in your licence to allow you to do this.

Do you have a developer licence or a licence with developer granules?

You may be better off using item journals and rapidstart services to populate the journals to load up changes with the correct dimensions.

Hope this helps.

Neil

Reply
Nabil BA-MOH responded on 2 May 2018 3:57 AM
My Badges
Suggested Answer

Hello David,

As already explained by Neil, you should not change entries the way you want to do it.

But if you want to change it anyway, here is a tool that will simplify your task

navnab.com/.../how-to-calculate-dimension-set-id

Of course you'll need the right permissions. And don't forget to add permission to table 32 to the Codeunit.

Reply
David Tailor responded on 2 May 2018 4:55 AM
My Badges

Hi Neil,

yes I have a developer license.

Let me show you example of entries that need to be modified:

1- I have an item with default dimensions: Region = North, Branch = ABC, ItemDep = Food.

2- they have posted purchases entries with dimension set id = 1200 (Dimensions are: Region = North, Branch = ABC and ItemDep = Food) and for the same item they have physical inventory journal entries with dimension set ID = 1300 (Dimensions are: Region = North, Branch = ABC).

3- what is needed: modify dimension set ID with value = 1300 to be 1200 because this item is a Food item and all entries for this item should have same dimension set ID (if same region and same branch).

Hope this is clear enough now.

Regards

David

Reply
David Tailor responded on 2 May 2018 4:57 AM
My Badges

Thank you Nabil for your link. see my reply.

Regards,

David

Reply
Khoa Nguyen responded on 2 May 2018 5:25 AM
My Badges
Suggested Answer

Hi David,

Hope below YouTube video helps you:

www.youtube.com/watch

Reply
Nabil BA-MOH responded on 2 May 2018 6:06 AM
My Badges
Verified Answer

David,

According to your explanation, the codeunit from the blog should work for you. Here is a sample code:

Of course, test it and test it again and again... And finally do it at your own risk :D

Reply
Nabil BA-MOH responded on 2 May 2018 6:06 AM
My Badges
Verified Answer

David,

According to your explanation, the codeunit from the blog should work for you. Here is a sample code:

Of course, test it and test it again and again... And finally do it at your own risk :D

Reply
Nabil BA-MOH responded on 2 May 2018 3:57 AM
My Badges
Suggested Answer

Hello David,

As already explained by Neil, you should not change entries the way you want to do it.

But if you want to change it anyway, here is a tool that will simplify your task

navnab.com/.../how-to-calculate-dimension-set-id

Of course you'll need the right permissions. And don't forget to add permission to table 32 to the Codeunit.

Reply
Khoa Nguyen responded on 2 May 2018 5:25 AM
My Badges
Suggested Answer

Hi David,

Hope below YouTube video helps you:

www.youtube.com/watch

Reply

SBX - Two Col Forum

SBX - Migrated JS