Mass Assign Serial Numbers

matttrax
Member Posts: 2,309
I'm trying to come up with a good way to assign serial numbers to every item on an order that requires them in one step. Currently you would have to go into Line --> Item Tracking Lines for every single line. This is a problem and takes too much time if you have a big order.
I'm thinking a link on the Order button, but I can't come up with a good way to do the code behind it. I want to build on what is already there, but almost all of the code is in Form 6510 - Item Tracking Lines.
I've looked at the code behind how this works, but I can't think of a way to do it for multiple items and then open the form. Or better yet not open the form at all and just pretend like I clicked on Functions --> Assign Serial from that form.
Has anyone else done this before? Do you have any suggestions or a best practice way to implement this? Any comments are helpful. Thanks.
I'm thinking a link on the Order button, but I can't come up with a good way to do the code behind it. I want to build on what is already there, but almost all of the code is in Form 6510 - Item Tracking Lines.
I've looked at the code behind how this works, but I can't think of a way to do it for multiple items and then open the form. Or better yet not open the form at all and just pretend like I clicked on Functions --> Assign Serial from that form.
Has anyone else done this before? Do you have any suggestions or a best practice way to implement this? Any comments are helpful. Thanks.
0
Comments
-
Not exactly the same.
We did a modification to track the Raw Material with the Lot Number of the Finished Goods. Manufacturing module was not in place and we assigned the lot number of the Finished Goods i.e. Positive adjustment in the Item Journal Line to all the negative adjustment line in the batch.
But assigning number in the serial order will be differentCA Sandeep Singla
http://ssdynamics.co.in0 -
I'm not familiar with the use of serial numbers but I was thinking a button on the header.
IF NOT DIALOG.CONFIRM("Would You Like To Get Serial Numbers For These Items",TRUE) THEN EXIT ELSE SalesLine.RESET; SalesLine.SETRANGE("Document Type","Document Type"); SalesLine.SETRANGE("Document No.","No."); IF SalesLine.FIND('-') THEN REPEAT //Your Code To Get The Serial Info LIke How (Functions --> Assign Serial) Works SalesLine.MODIFY(TRUE); UNTIL SalesLine.NEXT = 0;
That's if it uses sales line?? Not Sure, but the rest works 8)0 -
I wonder if Sales Line stores the Serial No. info.
For a order of 10 items there can be 10 serial number..... :-kCA Sandeep Singla
http://ssdynamics.co.in0 -
The sales line was an excample - not sure how serials work but I can Mass change "lines" with the Repeat->Until statement.
Then he'll have to figure a way in code of how the assigning can work "every time"!0 -
Why not use the standard Navision function of assigning custom S/N?
When you're at the item tracking line, click on Function --> Create Customized S/N. Then it'll assign the S/Ns you want.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
matttrax wrote:This is a problem and takes too much time if you have a big order.
:-k0 -
Use the standard feature out of the box. Why try to reinvent the wheel?Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I think most of the latter comments missed the point of the post. I know I can do it from the Item Tracking Window. The point is what if you have 50 lines on an order, each of which requires you to assign serial numbers. You have to manually click Line --> Item Tracking Lines, then Functions --> Assign Serial or Create Customized Serial. That's 4 clicks a line, or 200 clicks on a 50 line order. 200 clicks vs. 2 clicks is a lot of time saved for the user.
So it's not about how you do it now, or reinventing anything. It's about coming up with a way to make the user's job quicker so that they can process more orders in a given amount of time. I think it's a legitimate mod request.
Anyway, it seems like most people are not familiar with serialized inventory, but if someone is and has any suggestions I'd love to hear them. This mod is a lot more complicated that I thought it would be. Thanks for the help everyone.0 -
Yes, the serial no. and lot no. are implemented in a way, which is not easy to modify (too much code on forms etc.).
But there is easy way how to "assign" new lot/ser no. for some purchase/sales line. The base is these two functions:CreateReservEntryFor( ForType,ForSubtype,ForID,ForBatchName,ForProdOrderLine,ForRefNo, ForQtyPerUOM,Quantity,ForSerialNo,ForLotNo,ForExpirationDate); CreateEntry(ItemNo,VariantCode,LocationCode,Description,ExpectedReceiptDate, ShipmentDate,TransferredFromEntryNo,Status);
from codeunit 99000830 Create Reserv. Entry. If you call these two functions, the codeunit will create the correct entry for you.
Than code for creating the tracking line for purchase lie can look like:CreateReservEntry.SetDates( 0D,"Expiration Date"); CreateReservEntry.CreateReservEntryFor( DATABASE::"Purchase Line", "Document Type", "Document No.", '', 0, "Line No.", "Qty. per Unit of Measure", "Qty. to Receive (Base)", '', LotNo, "Expiration Date"); CreateReservEntry.CreateEntry("No.", "Variant Code", "Location Code", Description, "Expected Receipt Date", "Order Date",0,2);
If you create some batch doing that for each line you need for each lot/ser no. you need to assign, and if you add all the tests and other code (e.g. for testing if some lot/ser no. is already assigned, received etc.) you are done.0 -
Kine's method is what I've used in the past. You can use your own functions to create the reservation entry by hand too.
The nice thing about this method is that it work well with the normal user process. Once the reservation entries are created, if the user goes back to the item tracking lines they just appear because they are created on the fly based on the reservation entries.0 -
The example of the code is inspired by code executed when you close the form with Item Tracking. It is the core of the proces saving the temporary data into reservation entry. It means it is "standard" code for doing that...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