Adjust Cost Item Entryes Valuation Error
jlandeen
Member Posts: 524
When running the Adjust Cost Item Entries (Report 795 and CDU 5895) I have encountered an error with a date range and no Value Entries being found. This seems odd as there was no filter being set.
Error Message:
There is no Value Entry within the filter.
Filters: Item No.: <some item no.>, Valuation Date: <Start Date>...<End Date>.
I have seen other posts online about this - see: http://community.dynamics.com/forums/p/13397/18608.aspx.
When I was running this in debugger I traced the error to the GetValuationPeriod function in Table 5804 (Adjustment Entry Point). This function is expecting a value in the Valuation Date filed for it to work properly. However in some cases that value can be cleared (i.e. blank) and in that case the valuation date filter range is not set properly and thus has no records in it.
So my solution was to set it to the present valuation date that is being used in the filter and THEN call the function (just 1 new line of code).
Solution:
If anyone else is experiencing this problem and has any ideas on a solution please let me know what your experience has been. As this is modifying the adjust cost process which is quite ugly I think some peer review would be appreciated!
Error Message:
There is no Value Entry within the filter.
Filters: Item No.: <some item no.>, Valuation Date: <Start Date>...<End Date>.
I have seen other posts online about this - see: http://community.dynamics.com/forums/p/13397/18608.aspx.
When I was running this in debugger I traced the error to the GetValuationPeriod function in Table 5804 (Adjustment Entry Point). This function is expecting a value in the Valuation Date filed for it to work properly. However in some cases that value can be cleared (i.e. blank) and in that case the valuation date filter range is not set properly and thus has no records in it.
So my solution was to set it to the present valuation date that is being used in the filter and THEN call the function (just 1 new line of code).
Solution:
//Codeunit: 5895 - Inventory Adjustment
//Function: AvgValueEntriesToAdjustExist
IF "Valuation Date" > CalendarPeriod."Period End" THEN BEGIN
CalendarPeriod."Period Start" := "Valuation Date";
AvgCostAdjmtEntryPoint."Valuation Date" := "Valuation Date"; //<New Line/>
AvgCostAdjmtEntryPoint.GetValuationPeriod(CalendarPeriod);
END;
If anyone else is experiencing this problem and has any ideas on a solution please let me know what your experience has been. As this is modifying the adjust cost process which is quite ugly I think some peer review would be appreciated!
0
Comments
-
Actually I found my own answer - turns out I was finally able to track down a solution to this from Microsoft's knowledge base and it's pretty much the same thing that I have here. Not sure when this fix was posted but I only found it now.
See MS knowledge base article: 947850.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions