New location code must be ... in item ... (V4.00)
nromain
Member Posts: 57
Hello all,
I have a problem when i try to import data into a reclassification journal. I obtain an error message "new location code must be..."
Here is my code :
The debug stops in the validate of the New bin code :
it seems that the function getbin() give me the wrong bin. In fact when i enter in the function, i have already the wrong bin (Bin1 instead of Bin2)charged in the Bin record. When i enter the reclassification line manually, i have no problem and the Bin record is uninitialised before the getbin and charged with the right bin after the function.
Is there a problem in the getbin function or am i not using the right way to import data?
Thanks for your help
best regards,
Nicolas
I have a problem when i try to import data into a reclassification journal. I obtain an error message "new location code must be..."
Here is my code :
RecGItemJournalLine.VALIDATE("Location Code",location1);
RecGItemJournalLine.VALIDATE("Bin Code",bin1);
RecGItemJournalLine.VALIDATE("New Location Code",location2);
RecGItemJournalLine.VALIDATE("New Bin Code",bin2);
The debug stops in the validate of the New bin code :
New Bin Code - OnValidate()
TESTFIELD("Entry Type","Entry Type"::Transfert);
IF "New Bin Code" <> xRec."New Bin Code" THEN BEGIN
TESTFIELD("New Location Code");
IF "New Bin Code" <> '' THEN BEGIN
GetLocation("New Location Code");
Location.TESTFIELD("Bin Mandatory");
Location.TESTFIELD("Directed Put-away and Pick",FALSE);
GetBin("New Location Code","New Bin Code");
[b][u]TESTFIELD("New Location Code",Bin."Location Code");[/u][/b]
END;
END;
it seems that the function getbin() give me the wrong bin. In fact when i enter in the function, i have already the wrong bin (Bin1 instead of Bin2)charged in the Bin record. When i enter the reclassification line manually, i have no problem and the Bin record is uninitialised before the getbin and charged with the right bin after the function.
Is there a problem in the getbin function or am i not using the right way to import data?
Thanks for your help
best regards,
Nicolas
0
Comments
-
are u using a dataport ?/PDR0
-
Hi Nicholas
There seems to be a bug on the getbin function in that if you call it with the same bin code but different locations then it doesn't get the bin record
e.g. getbin( 'loc1', 'bin1 ); -> getbin( 'loc2', 'bin1' );GetBin(LocationCode : Code[10];BinCode : Code[20]) IF BinCode = '' THEN CLEAR(Bin) ELSE IF Bin.Code <> BinCode THEN Bin.GET(LocationCode,BinCode);
the IF statement should readIF ( Bin.Code <> BinCode ) or ( bin."location code" <> locationcode )THEN Bin.GET(LocationCode,BinCode);
Hope this helps - I didn't search for a hotfix, etc0 -
Thank you DaveT. I was not sure this was a bug
I'm going to correct the function
Best regards
Nicolas0
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
- 251 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