Inventory Storewise in Nav 2016
omyvadiya
Member Posts: 124
Hi,
By using the inventory field of Item table, one can get the inventory of all the stores.
I have to somehow show the user, inventory of his/her Store ONLY.
Actually my idea is to create a location field in user setup, and by assigning a Location to the user and then the inventory must be filtered as per that location field of User table.
Thanks in Advance
By using the inventory field of Item table, one can get the inventory of all the stores.
I have to somehow show the user, inventory of his/her Store ONLY.
Actually my idea is to create a location field in user setup, and by assigning a Location to the user and then the inventory must be filtered as per that location field of User table.
Thanks in Advance
0
Best Answer
-
This code worked for me on the OnAftergetrecord of the Item balance Page & on ILE pages OnOpenPage:
FILTERGROUP(2);
IF UserSetupRec.GET(USERID) THEN BEGIN
IF (UserSetupRec."Location Code 1" <>'' ) OR (UserSetupRec."Location Code 2" <>'')
OR (UserSetupRec."Location Code 3" <>'') OR (UserSetupRec."Location Code 4" <>'') THEN
SETFILTER("Location Filter",'%1|%2|%3|%4',UserSetupRec."Location Code 1",UserSetupRec."Location Code 2",
UserSetupRec."Location Code 3",UserSetupRec."Location Code 4");
IF (UserSetupRec."Location Code 1" ='' ) AND (UserSetupRec."Location Code 2" ='')
AND (UserSetupRec."Location Code 3" ='') AND (UserSetupRec."Location Code 4" ='') THEN
FILTERGROUP(0);
END
0
Answers
-
What did you tried so far?Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
This code worked for me on the OnAftergetrecord of the Item balance Page & on ILE pages OnOpenPage:
FILTERGROUP(2);
IF UserSetupRec.GET(USERID) THEN BEGIN
IF (UserSetupRec."Location Code 1" <>'' ) OR (UserSetupRec."Location Code 2" <>'')
OR (UserSetupRec."Location Code 3" <>'') OR (UserSetupRec."Location Code 4" <>'') THEN
SETFILTER("Location Filter",'%1|%2|%3|%4',UserSetupRec."Location Code 1",UserSetupRec."Location Code 2",
UserSetupRec."Location Code 3",UserSetupRec."Location Code 4");
IF (UserSetupRec."Location Code 1" ='' ) AND (UserSetupRec."Location Code 2" ='')
AND (UserSetupRec."Location Code 3" ='') AND (UserSetupRec."Location Code 4" ='') THEN
FILTERGROUP(0);
END
0 -
Didn't you tried something handling with flowfields only??
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Hi,
i tried but it didn't worked, last option was using filtergroup filtering on the page.
I think using Inventory flowfields and Location Filter Flowfilter might work...0 -
There is a field "Location Filter" in the item table.
This is a special field, the sole purpose is to filter flowfields that have the filter field added to their properties. In pages this is caled the flow filter.
So just filter item.setrange("location filter",usersetup."location code");
Edit: you used this field i see now. So it should work.0 -
Yah i used it, and it is working fine.0
-
Hi,
Can anyone tell me from where i can close this query, as it is solved, i tried editing the first question of this issue trail, but couldn't find any Solved option.
PFA0 -

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

