Tracking specification Purchase order

Rikarddo
Member Posts: 80
Hi,
I'm trying to implement a code that calculates on the tracking specification table the expiration date automatically.
This is the procedure.
Select a line of purche order, go to item tracking lines page( tracking specification table) . Assign a random lot, and fill up that information. On close that page it should calculate the expiration date with
the production order before imputed.
But it gives me an error "the tracking specification does not exist mov. nº 0"
Please some help, or if there is another way to calculate that field
Thanks in advance
I'm trying to implement a code that calculates on the tracking specification table the expiration date automatically.
This is the procedure.
Select a line of purche order, go to item tracking lines page( tracking specification table) . Assign a random lot, and fill up that information. On close that page it should calculate the expiration date with
the production order before imputed.
item.GET("Item No."); LotNoInformation.RESET; LotNoInformation.SETRANGE("Item No.","Item No."); LotNoInformation.SETRANGE("Lot No.","Lot No."); IF LotNoInformation.FIND('-') THEN IF FORMAT(item."Expiration Calculation")<>'' THEN BEGIN expdatetemp:=CALCDATE(item."Expiration Calculation",LotNoInformation."Production Date"); TrackingSpecification.MODIFY; END//Ric
But it gives me an error "the tracking specification does not exist mov. nº 0"
Please some help, or if there is another way to calculate that field
Thanks in advance
0
Answers
-
Hi
Where did you add your code?
expdatetemp appears to be a variable; TrackingSpecification is not assigned to.
Have you considered to do your modification in the same place as the standard functionality using item."Expiration Calculation", which is (mainly) Table 83 Item Journal Line?
0 -
To create a new lot i have to attribute new lot, then open page 6508, and create new lot in page 6505.
I'm adding the code on trigger close page of 6508.0 -
Hi,
check out the WriteToDatabase functions and you'll realize it is not as straight forward to do this as you might have thought.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