Blocked Production Orders and Qty. On Component Lines
poppins
Member Posts: 647
Hi everyone,
I have an issue with the calculation of Qty. On Component Lines field displayed in the Item Card.
I checked in the Item table about that field, it is a flow field....The CalcFormula is:
The problem is that I want to exclude the remaining quantities of the blocked production
orders from the calculation...
How can I do that???
I have an issue with the calculation of Qty. On Component Lines field displayed in the Item Card.
I checked in the Item table about that field, it is a flow field....The CalcFormula is:
Sum("Prod. Order Component"."Remaining Qty. (Base)" WHERE (Status=FILTER(Planned..Released),
Item No.=FIELD(No.),
Shortcut Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Shortcut Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Variant Code=FIELD(Variant Filter),
Due Date=FIELD(Date Filter)))
The problem is that I want to exclude the remaining quantities of the blocked production
orders from the calculation...
How can I do that???
0
Answers
-
You will have to add a "Blocked" field to component lines as well, and update it when the blocked field on the production order changes. You will then be able to use this field in the flow field's CalcFormula.0
-
Where should I place the code for the update (in which trigger)???MarkHamblin wrote:You will have to add a "Blocked" field to component lines as well, and update it when the blocked field on the production order changes. You will then be able to use this field in the flow field's CalcFormula.0 -
I will try the OnValidate() trigger of the field...0
-
Yes, in OnValidate of the Blocked field on table 5405, add something along these lines should do it:poppins wrote:I will try the OnValidate() trigger of the field...ProdComps.SETRANGE(Status, Status); ProdComps.SETRANGE("Prod. Order No.", "No."); ProdComps.MODIFYALL(Blocked, Blocked);0 -
Thank you for your help, it worked
0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions