Item No. '#NAME?' does not exist.
slmaluwa
Member Posts: 366
We suddenly started to see the above error
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).
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
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 dataItem No. '#NAME?' does not exist.
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
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
0
Answers
-
It seems that there are some entries for such an item but there is no record in table 27 for that item. You need to check it...0
-
A quick search on Item Ledger Entry Table and Value Entry table doesn't find anything.
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 ](*,)"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
DO not forget to add quotes when filtering in NAV for this value, else the ? will be used as "1 character I do not know".0
-
IsDeletedItem := ItemNo = '';
is this some custom code - I have no such code in my 58950 -
I also don't know whether this area is customized. No such comments by any previous developer
But it is NAV 4 SP3"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
Is this the whole code?
You have an ELSE BEGIN without a THEN BEGIN?
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;
This seems better to me - unless there's code I'm not seeingIF ItemNo = '' THEN IsDeletedItem := TRUE ELSE IsDeletedItem := FALSE; //IF (Item."No." <> ItemNo) OR IsDeletedItem THEN<<<is this actually doing anything? IF NOT IsDeletedItem THEN BEGIN Item.GET(ItemNo); END ELSE BEGIN CLEAR(Item); Item.INIT; END;
Even easierIf not item.get(ItemNo) then begin CLEAR(Item); Item.INIT; END;
Does that code look wierd or i it just me :-k0 -
Savatage wrote:
Does that code look wierd or i it just me :-k
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.GetItem(ItemNo : Code[20]) IsDeletedItem := ItemNo = ''; IF (Item."No." <> ItemNo) OR IsDeletedItem THEN IF NOT IsDeletedItem THEN Item.GET(ItemNo) ELSE BEGIN CLEAR(Item); Item.INIT; END;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?"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
Just enable debugger and run the process, you will see where it will fail. And you can use Client monitor to see which tables are used...0
-
The code is fine, thought I think the standard recommendation is to complete the "Then Begin" followed by an "Else" rather than a "Else" followed by a "then begin".
So since nearly everywhere else in the system you will see itIf X = Y then begin DoA; DoB; End else DoC;
It is technically the same asIf X <> Y then DoC else begin DoA; Dob; end;
Just looks odd because you don't see it often, it is however syntax correct.
Regards the codeIF (Item."No." <> ItemNo) OR IsDeletedItem THEN<<<is this actually doing anything? IF NOT IsDeletedItem THEN BEGIN Item.GET(ItemNo); END ELSE BEGIN CLEAR(Item); Item.INIT; END;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.IF (Item."No." <> ItemNo) OR IsDeletedItem THEN
t0 -
Hi guys
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"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 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
