How to attach lot number to transaction - web services?

mgifford
Member Posts: 44
I am trying to import "consumption journal" entries into NAV via web services - the first part seems easy and I have been able to get the basic lines imported. The part I cannot seem to follow well enough in the code to figure out is trying to specify the lot numbers being consumed for a given item.
In the classic form you would select a line then Line-> Item Tracking Lines and enter the lot information there. I had hoped that I could load the Item Tracking Lines Page via web services and enter the data. The problem is that there is a ton of code being called prior to launching the Item TRacking Lines screen when it is called from the classic client. So, I can't just run the page and fill out the fields/validate as I had really hoped to.
Can anyone shed some light on better approach for me? I am not getting very far in trying to sort through the code. How would you recommend importing this with webservices?
In the classic form you would select a line then Line-> Item Tracking Lines and enter the lot information there. I had hoped that I could load the Item Tracking Lines Page via web services and enter the data. The problem is that there is a ton of code being called prior to launching the Item TRacking Lines screen when it is called from the classic client. So, I can't just run the page and fill out the fields/validate as I had really hoped to.
Can anyone shed some light on better approach for me? I am not getting very far in trying to sort through the code. How would you recommend importing this with webservices?
0
Comments
-
create a codeunit and publish it with same Name as the Page and in the function create the reservation entries.0
-
Thanks, so I basically I just have to hit the 337 Reservation Entry table with the proper settings? I was getting pretty twisted around the Item Tracking table's involvment (or lack thereof). I just saw in another post a description of the copying back and forth that occurs behind the scenes.0
-
you use the following code to insert a Lot
CreateReservEntry.SetDates( 0D, 0D); reateReservEntry.CreateReservEntryFor( DATABASE::"Item Journal Line", ItemJnlLine."Entry Type", ItemJnlLine."Journal Template Name", ItemJnlLine."Journal Batch Name", 0, ItemJnlLine."Line No.", ItemJnlLine."Qty. per Unit of Measure", 1, '', 'mylotNo'); CreateReservEntry.CreateEntry( ItemJnlLine."Item No.", ItemJnlLine."Variant Code", ItemJnlLine."Location Code", ItemJnlLine.Description, ItemJnlLine."Posting Date", ItemJnlLine."Document Date", 0, 2);
0 -
That is awesome! Thank you very much.0
-
you are welcome.
reateReservEntry is a codeunit 99000830 (Create Reserv. Entry) btw.0 -
Thanks, yea, I didnt see it initially, but found it. I am not familiar with it, so your sample of which calls to use, etc is extremely helpful.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