Add Last Direct Cost to Production BOM Lines Page

stormcandi
Member Posts: 27
Hello all,
I am trying to add the Last Direct Cost from the Item table to the Production BOM Lines Page (99000788). I cannot figure out how to do this. I have added the Item table as a Global variable and then added the Last Direct Cost to the Production BOM Lines Page but everything always shows as 0.00 for the Last Direct Cost. I feel like I am missing a step here, but cannot figure out what it is.
Candi
[-o<
I am trying to add the Last Direct Cost from the Item table to the Production BOM Lines Page (99000788). I cannot figure out how to do this. I have added the Item table as a Global variable and then added the Last Direct Cost to the Production BOM Lines Page but everything always shows as 0.00 for the Last Direct Cost. I feel like I am missing a step here, but cannot figure out what it is.
Candi
[-o<
0
Answers
-
Hi
Yes just set up the link between the 2 so that the item number on the production BOM line can find the last direct cost off the item table. Something like this on the OnAfterGetRecord section:
clear(LastDirectCostG);
IF (T99000772.type=T99000772.type::Item) and (T27L.get("No.")) then LastDirectCostG:=T27L."Last Direct Cost"
L defined as local, G as global.
Neil0 -
Neil,
Hi! Your code worked perfectly. Thanks so much!0 -
Neil,
One issue I noticed. If there are multiple Lines the first two are correct but any more than two are duplicated. So for example, Line 1 Direct Cost is 1.15. Line 2 Direct Cost is 0.70. The rest of the lines are also 0.70 for the Direct Cost.
Hopefully this makes sense.
UPDATE: I put the code in the OnAfterGetCurrRecord instead of OnAfterGetRecord. I moved the code to the correct place and it is working as it should. Thanks Neil!
Candi0
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