Automatic Assign Item Tracking on Production Order Line

andy76
Member Posts: 616
Good morning,
I have to develop a report that scrolls all production order lines having an item with item tracking code (and a flag that I already manage) to assign automatically to them lot no or serial no. in
table reservation entry 337 with a method similar to form 6510 - menu Item ID 51 Assign &Serial No. and menu Item ID 52 Assign &Lot No.
NAV 5.0
I want to know wich is the better way as I cannot call the trigger/function of the form and manage the tmp table Tracking Specification.
I only would like to call functions to populate correctly the table 337 Reservation Entry. Is there something or do I need to develop all?
Thank you
Andy
I have to develop a report that scrolls all production order lines having an item with item tracking code (and a flag that I already manage) to assign automatically to them lot no or serial no. in
table reservation entry 337 with a method similar to form 6510 - menu Item ID 51 Assign &Serial No. and menu Item ID 52 Assign &Lot No.
NAV 5.0
I want to know wich is the better way as I cannot call the trigger/function of the form and manage the tmp table Tracking Specification.
I only would like to call functions to populate correctly the table 337 Reservation Entry. Is there something or do I need to develop all?
Thank you
Andy
0
Comments
-
Of course there are some functions you can use... something like:
CreateReservEntry.SetNewSerialLotNo(...);
CreateReservEntry.SetDates(...);
CreateReservEntry.CreateReservEntryFor(...);
CreateReservEntry.CreateEntry(...);
CreateReservEntry.GetLastEntry(...);
If you fill the parameters correctly, it will do the job for you...
Or you can look into codeunit 99000837 Prod. Order Line-Reserve...0 -
The variable CreateReservEntry of what type is it?
Thank you very much0 -
I found it :
CreateReservEntry Codeunit Create Reserv. Entry0 -
-
I have a lot of difficult about these objects.
I don't understand if:
-99000837 Prod. Order Line-Reserve.CreateReservation can be used by my report and when it is called in standard NAV code, for which aim
- what is the aim/difference of function :
CreateReservEntryFor(ForType : Option;ForSubtype : Integer;ForID : Code[20];ForBatchName : Code[10];ForProdOrderLine : Integer;ForRefNo
and
CreateReservEntryFrom(FromType : Option;FromSubtype : Integer;FromID : Code[20];FromBatchName : Code[10];FromProdOrderLine : Integer;Fr
Thank you again0 -
All the functions are part of the process of creating the entry. ...For is the target and From is the source of the reservation... (in standard reservations are between two things. E.g. Item Ledger and Sales Line, Prod. order line and Sales line, Prod. Order Component and Item Ledger etnry etc...).
If you do not know the From part (you are just assigning Lot/Serial no. to the line which will produce the item), you just use the For function to select for which target you want to create the reservation...0 -
Hi i have the same probelms,
I create a codeunit to insert into Journal Line, then Insert Temporary table Tracking Specification.
Then i call function :
- CreateReservEntry.SetDates(
- CreateReservEntry.CreateReservEntryFor(
- CreateReservEntry.CreateEntry(
from CU "Create Reserv. Entry"
Then i open the Item Journal, i can see my item journal is already inserted.
and when i check table 337 "Reservation Entry" its already filled.
The problem is when i Open Item Journal, then click on [Line] - [Item Tracking Lines] it didn't show my tracking specifications.
Where did i go wrong? When i do it manually, the result in table 337 is the already the same with the one that i run with my codeunit.
Is there any other table that i need to insert?
Thanks in advance______________
Regards,
Steven0 -
Compare the manually (through the forms) created entry with the one created by code. It seems that you are creating entry with wrong Reservation status.0
-
Yep Thanks Kine,
I already find out the problems. Its the "Source Ref. No." field that i got it wrong.
And also Thanks for everyone in this thread______________
Regards,
Steven0
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