Adjust Cost Item Entryes Valuation Error

jlandeenjlandeen 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:
//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!
Jeff Landeen - Sr. Consultant
Epimatic Corp.

http://www.epimatic.com

Comments

  • jlandeenjlandeen Member Posts: 524
    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.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.