Import Item Tracking Serial Numbers

JLkf_Uk
Member Posts: 6
Hi,
I have a request for importing item tracking serial numbers from an excel spreadsheet using a new function in the Item tracking lines Form. I searched the forum and found that the only way is to import the Serial Nos to new entries in the reservation entry table. My problem is that when i import the lines from the Item Tracking Form i have an error "Another user has modified the record" because when this form starts it locks the reservation entries table. #-o Anyone has developed this?
Thanks in advanced
I have a request for importing item tracking serial numbers from an excel spreadsheet using a new function in the Item tracking lines Form. I searched the forum and found that the only way is to import the Serial Nos to new entries in the reservation entry table. My problem is that when i import the lines from the Item Tracking Form i have an error "Another user has modified the record" because when this form starts it locks the reservation entries table. #-o Anyone has developed this?
Thanks in advanced
0
Comments
-
I'm affraid we need a little more info.
The Item Tracking part is by far the worst design part of Navision and hard to make changes to.
Where do you want to assign these? In the manufacturing process? Or Purchassing? What is the Form number, and what code did you write?0 -
Hi Mark,
Sorry i should have posted more info. The process is to import Serial Nos from an excel spreadsheet to the Purchase Order Lines. The user must go to the Purch Order -> Line -> Item Tracking Lines and open form 6510. Then it should have a function (in functions button) called "Import Tracking Lines" that should create the tracking lines from the specified spreadsheet. Excel spreadsheet will have only one column "Serial No.", quantity will always be 1.
Thank you0 -
"Another user has modified the record after it has been read" has nothing to do with locking.
Can you share the code that you have created?
It has been ages since I've worked with reservations, but maybe reading the code it will ring a bell.0 -
Hi Mark,
I have a function at F6510 Item Tracking Lines that calls a reports to write the serial numbers to the reservation entry table. But when F6510 is closed this standard code runs:
F6510 Item Tracking LinesWriteToDatabase() IF CurrentFormIsOpen THEN BEGIN TempReservEntry.LOCKTABLE; IF NOT TempRecIsValid THEN ERROR(Text007);
This error is returned:
Microsoft Dynamics NAV Classic
Another user has modified the item tracking data since it was retrieved from the database.
Start again.
OK
0 -
I don't think form 6510 is a good place for this modification.
It's by far the most dramatically designed form in Navision ever.
I would create a new codeunit with the purchase line as parameter that creates the reservation entries, completely skipping the code in form 6510.
This does require thourough knowledge of the reservation engine.0 -
As Mark wrote, form 6510 does not provide the table tracking lines - but has some "dramatic" logic.
I wrote a codeunit to create reservation entries that is called by web services. You should look at existing tracking lines created for the various scenarios you wish to support.
Receipts and shipments can be generated from multiple places and the data in the corresponding entries will vary accordingly.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Thank you both for the suggestions. I do agree and will remove the functionality of this form, lets hope the customer will accept it :?0
-
I have done a lot of work in this area (lots of item tracking customizations - don't get jealous!) in the past few years.
You may want to use the Create Reserv. Entry codeunit, and the two functions CreateReservEntry.CreateReservEntryFor & CreateReservEntry.CreateEntry.
Basically, by calling those two functions, you can properly create an item tracking line for an document. In the following example, we are automatically creating an item tracking line for the full quantity of the purchase line. It might not match exactly what you need, but if you allowed the user to enter or import many item tracking details per documetn line, you woudl just loop this code changing the quantity, lot & serial. It then creates the reservation entry properly.
CreateReservEntry.CreateReservEntryFor(DATABASE::"Purchase Line",
SubType,
"Document No.",'',
0,"Line No.","Qty. per Unit of Measure",
"Quantity (Base)" - TrackingSpec."Quantity (Base)",
'',{this is the serial number parameter}
LotNo); //this field we figured out based on setup
CreateReservEntry.CreateEntry("No.","Variant Code","Location Code",'',
PurchHeader."Expected Receipt Date",0D,0,
ResStatus);
The problem with the item tracking form is that it is based on temporary tables, which group item ledgers together, and it makes it very hard to see what is going on until the form is clsoed, then the reservation engine lopps & groups and creates item tracking records. The other issue with this form is that you have to close it to go to the next line - if your customers use a lot of item tracking, this process becomes unuable, especially during inventory selection. Imagine a 20 line sales order, with 5 different lots being selected per sales line. You go to the line, open item tracking, open select entries, selct a few lines, close that form, close item tracking, and repeat TWENTY times. We ended up building some different screens to avoid the item tracking windows, but we still used a great deal of their code, it was simply too complex to start from scratch.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions