Base Unit Of Measure error

Mathan
Member Posts: 55
Hi,
We get an error stating base unit of measure must have a value in item master when posting an created sales order. There is no Base Unit of measure set for that Item. But some how they have posted purchased receipt, Now it has 4 qty in the inventory. When we tried to post a negative journal for that item, Even then we get this error again. Is there any way to set the Base unit of measure for that Item. Any help would be appreciated.
Thanks,
Mathan
We get an error stating base unit of measure must have a value in item master when posting an created sales order. There is no Base Unit of measure set for that Item. But some how they have posted purchased receipt, Now it has 4 qty in the inventory. When we tried to post a negative journal for that item, Even then we get this error again. Is there any way to set the Base unit of measure for that Item. Any help would be appreciated.
Thanks,
Mathan
0
Best Answers
-
If you are having that issue in production, then you have a serious problem with someone accessing your data without validation. NAV won't allow you to change the base unit of measure if there are any transactions for the item, as you are now finding out. It also will not post a transaction if there is no base unit of measure. This means that somehow the base unit of measure got removed after those transactions were posted. You should really try to find out how it happened, because you don't want any regular process in your system to be removing any values in that field. Item ledger transactions are in base unit of measure, and you do not want that to change outside of normal validation.
The only way to get it back is to hack it back, either by developing a process like a page with a button that sets it without validating the field and without running OnModify, or by going into SQL Server and setting it there. You will not be able to change it back manually.1 -
I have gone through the scenario you described above. A simple solution of this is that you should go to NAV Dev and Design Table Item 27. Go to field no. 8 Base Unit of Measure. Press F9 and go to its C/AL code and comment OnValidate trigger for this field( Base Unit of Measure). Then restart client and assign Base Unit of Measure. Post your sales order and then again uncomment this trigger. Image is also attached. But its really strange how Unit of Measure is removed if it has some open ledger entries.
1 -
Item."Base Unit Of Measure" := 'YourValue';
Item.MODIFY;
eg., what DenSter suggested.1
Answers
-
If you are having that issue in production, then you have a serious problem with someone accessing your data without validation. NAV won't allow you to change the base unit of measure if there are any transactions for the item, as you are now finding out. It also will not post a transaction if there is no base unit of measure. This means that somehow the base unit of measure got removed after those transactions were posted. You should really try to find out how it happened, because you don't want any regular process in your system to be removing any values in that field. Item ledger transactions are in base unit of measure, and you do not want that to change outside of normal validation.
The only way to get it back is to hack it back, either by developing a process like a page with a button that sets it without validating the field and without running OnModify, or by going into SQL Server and setting it there. You will not be able to change it back manually.1 -
Thanks for your response Denster, Yes the issue is in the production. And I believe they won't give us the access to the SQL Server.
Is it possible or a way to create a report to run a batch job without validating the field and without running OnModify? Can you give a small example or a tip?
Thanks,
Mathan0 -
I have gone through the scenario you described above. A simple solution of this is that you should go to NAV Dev and Design Table Item 27. Go to field no. 8 Base Unit of Measure. Press F9 and go to its C/AL code and comment OnValidate trigger for this field( Base Unit of Measure). Then restart client and assign Base Unit of Measure. Post your sales order and then again uncomment this trigger. Image is also attached. But its really strange how Unit of Measure is removed if it has some open ledger entries.
1 -
Item."Base Unit Of Measure" := 'YourValue';
Item.MODIFY;
eg., what DenSter suggested.1 -
Thanks people, All your suggestions works.
I finally went with as Denster suggested and just like Johnhunter's example.
I created a codeunit and ran it.
IF Item.GET('Item name') THEN BEGIN
Item."Base Unit of Measure" := 'Change the BUOM';
Item.MODIFY;
END;
0 -
Good to hear that you were able to solve the issue, and thanks for following up. Now go on a 'search and destroy' mission to whoever made this change in the first place2
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions