Quantity for items per location not updated.

liizz
Member Posts: 125
Hello all,
I have added a field Inventory on the Purchase Line of my Purchase Order which check the Quantity for items per location defined.
I have added a Flowfield on the field Inventory on the table: Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),Location Code=FIELD(Location Code)))..
For e.g: I have chosen Item A and Location Code Green which returns a Quantity of 2 in my Inventory field..
Now, I have change Location Code to White which has a zero quantity but it is giving 2 as quantity.
It is not being updated accordingly. I have to click on the Sales Header part for it to update.
How can I refresh the Quantity without clicking on the form?
Also I have used: CurrForm.UPDATECONTROLS on the Location Code- OnValidate
Thanks
Liizz
I have added a field Inventory on the Purchase Line of my Purchase Order which check the Quantity for items per location defined.
I have added a Flowfield on the field Inventory on the table: Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),Location Code=FIELD(Location Code)))..
For e.g: I have chosen Item A and Location Code Green which returns a Quantity of 2 in my Inventory field..
Now, I have change Location Code to White which has a zero quantity but it is giving 2 as quantity.
It is not being updated accordingly. I have to click on the Sales Header part for it to update.
How can I refresh the Quantity without clicking on the form?
Also I have used: CurrForm.UPDATECONTROLS on the Location Code- OnValidate
Thanks
Liizz
0
Comments
-
Similar issue has been discussed previously.
Please Search the form.0 -
Add a CALCFIELD command for the inventory field to the OnValidate trigger of the Item number and the Location code fields, in the TABLE NOT THE FORM.
You need to stop programming forms for data validation. The form triggers are for display purposes only. Data validation should be programmed on the table level.0 -
You need to stop programming forms for data validation. The form triggers are for display purposes only0
-
liizz wrote:Can you please explain me in some details.0
-
Also, I fail to understand why you need to add the Inventory field in the Purchase Line table? If you need to display the stock balance of an item in combination to it's location, you can calculate the Inventory by taking a record variable for Item and write a code to filter and then issue a CalcFields for Inventory field and get the balance in a variable. Then display the variable in the Purchase Line with a calculated field.
Chn0
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