This is our current process for handling sales orders:
1. A client sends us a data file containing the sales headers and detail lines.
2. We import that file into tables in NAV that act as holding tables. These tables are copies of the Sales Header (#36) and Sales Line (#37) tables.
3. We run two scheduled reports which process information in the holding tables and insert the records into the Sales Header and Sales Line tables.
We are currently using Lot. Numbers to track items. However, we are not using the Lot. No. series but are entering the Lot. No. manually during a purchase order.
What we need to happen, either programmatically or automatically, is when a Sales Line record is inserted, it must have the "Item Tracking Lines" populated with the correct Lot. No., according to FIFO.
What we are trying to similuate automatically is the funcitonality of the following manual steps:
1. Open the "Sales Order" Card/Form
2. Click on one of the Sales Line.
3. Click on Line -> Item Tracking Lines from the menu buttons.
4. On the new form that appears, "Item Tracking Lines", Click on Functions -> Select Entries
5. A new form will open, "Item Tracking - Select Entries", with the appropriate Lot(s) selected, according to FIFO.
6. Click the "OK" button and the "Item Tracking Lines" form is populated with all of the information.
Is this something that we can do programmatically or have NAV do for us automatically?
Thank you,
Leo
0
Comments
A good place to start is Codeunit 99000845 - Reservation Management. There are other codeunits around that ID that can help too.
The following code might also help
where CreateReservEntry is an instance of Codeunit 99000830.
My Blog - nav.education