Hi,
I've just migrated to Nav 5.0, and an error occurrs when I run the report to adjust costs.
I'm running this report, for imported entries from different years.
The Error is: "There is no Value Entry within the filter.
Filters: Item No.: 120000181, Valuation Date:01-01-08..31-12-07"
Tried the same on Nav 4.0 and didn't have any problems.
After debugging it seems that the program, when treating an entry from the year after, gets the wrong valuation date. I made a change to codeunit 5895 - Inventory adjustment that seems to work, but I need to find out if it is a bug or not, for Nav 5.0.
Did anyone had this problem?
Thanks
Answers
think you have to check table item ledger entry's entry no. is not available item ledger entry no. filed in value entry table for that particular item.
if there are no. of item ledger entry then create function that checks each ILE entry no. is available in item ledger entry no. field of Value Entry table.
Rajesh Patel
Don't really think the problem is that.
The adjust cost features, in NAV 5, are completly different from NAV4
The entries were imported to NAV 4 and NAV 5 in the same way,
and it works on NAV4.
The error message clearely displays a date interval that is impossible!
"...Valuation Date:01-01-08..31-12-07"
Can be bug or lack or configuration somewhere!
And was the Batch or code unit modified in anyway BEFORE the upgrade? If so how did you transfer those mods across?
If this is a bug in standard NAV, its something that could affect many people.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
:oops: I completely forgot that...
Througout my tests I was reading about the Inventory periods, I got the ideia that it´s not obligatory to fill them. Anyway, I did the test now, and the problem persists.
Yes, we did a full upgrade, and the code has never been changed by us.
At the time you run the report, the table "Avg. Cost Adjmt. Entry Point" ,
for a certain Item, has records for each period where the item had entries.
During the excution of the report, this table is temporarily filled, for the item,as if there were entries in all periods. When it goes from one entry that in reality does not exist in vallue entry, to one that exists and is from another year, it crashes with the error of the date interval.
In NAV 4, at some point, there is an evaluation of the "Avg. Cost Adjmt. Entry Point"."Valuation Date" to the "Value Entry"."Valuation Date", and in NAV 5 there isn't.
In Codeunit 5895 - Inventory Adjustment, in function AvgValueEntriesToAdjustExist, I Tried this, and worked, just not sure if it is the best solution.
IF FINDFIRST THEN BEGIN
FindNextRange := TRUE;
IF "Valuation Date" > CalendarPeriod."Period End" THEN BEGIN
CalendarPeriod."Period Start" := "Valuation Date";
//
AvgCostAdjmtEntryPoint."Valuation Date" := "Valuation Date";
//
AvgCostAdjmtEntryPoint.GetValuationPeriod(CalendarPeriod);
END;
NAV Freelance Consultant
Here's the link to solve it!
https://mbs.microsoft.com/knowledgebase ... OPUQUOKTYN