We suddenly started to see the above error
Item No. '#NAME?' does not exist.
when running while posting any sales (or item) related transactions. I found that it happens when automatic posting of cost to GL Account running. So, I disabled Automatic Cost posting and asked to users to continue to enter data
In the meantime, I also tried to run "Adjust Cost - Item Entries" but, found that this error repeating.
Has anybody seen this before and solved? I used the debugger and found that this happens in this function (CU 5895 Inventory Adjustment).
GetItem(ItemNo)
IsDeletedItem := ItemNo = '';
IF (Item."No." <> ItemNo) OR IsDeletedItem THEN
IF NOT IsDeletedItem THEN
Item.GET(ItemNo)
ELSE BEGIN
CLEAR(Item);
Item.INIT;
END;
I am about to trace the issue in detail using debugger.
But. much appreciate if anyone here who has already experienced this issue earlier and solved it could shed some ideas/help.
Thank you
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
It resembles the MS Excel's error "#NAME?' when a formula typed in Cell does not exists. So, it MAY be something related to a data import.
I will keep on trying to spend the weekend freely ](*,)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
is this some custom code - I have no such code in my 5895
http://www.BiloBeauty.com
http://www.autismspeaks.org
But it is NAV 4 SP3
You have an ELSE BEGIN without a THEN BEGIN?
GetItem(ItemNo)
This seems better to me - unless there's code I'm not seeing
Even easier
Does that code look wierd or i it just me :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
I also checked the VER 5.0 DB and the same function is available with the same code.I also understand your point with regard to that IF line. This is a W1 release. I also exported all objects to TXT and searched for "#NAME?" hoping that it is hard coded somewhere. But, nothing found.
So the value must be coming from data from the table which we now have to search one by one.
Does anyone know which tables the Inventory Adjustment process touches?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
So since nearly everywhere else in the system you will see it
It is technically the same as
Just looks odd because you don't see it often, it is however syntax correct.
Regards the code
The line if needed to enter the rest of the conditons. If this condition is false then none of the rest of the code is run.
t
I found the problem entry in table "5804 Avg. Cost Adjmt. Entry Point No". This table had some OLD entries with an item code "#NAME?". I removed that line and ran the "Adjust Cost - Item Entries" batch job. All went well and this table is now cleared.
Appreciate all your replies