Flowfilters in a published page

johntaylormfc
Member Posts: 22
We have a published a page which is the list of employees.
On the employee table I have a flowfilter, Lookup Department Filter, and a flowfield which uses an exist to be set to true if there is a record in an employee jobs table for the department in the flowfilter. The idea being to limit the list to employees who can work for a given department.
In the OnOPenPage trigger we have
SETFILTER("Works for Department", TRUE)
What I need to do is set the LookUp Department Filter to a specific Department and then run the page, so the list is automatically filtered. our web developer has used the following code (which I don’t Understand!)
NAV_EmployeeList_Page.EmployeeList_Service empservice = new NAV_EmployeeList_Page.EmployeeList_Service();
empservice.UseDefaultCredentials = true;
NAV_EmployeeList_Page.EmployeeList_Filter empfilter = new NAV_EmployeeList_Page.EmployeeList_Filter();
empfilter.Field = NAV_EmployeeList_Page.EmployeeList_Fields.DepartmentFilter;//trying to use a flow filter but errors
empfilter.Criteria = "12345";
empservice.ReadMultiple(new NAV_EmployeeList_Page.EmployeeList_Filter[] { empfilter }, null, 0);
I have added the flowfilter as DepartmentFilter to the page, as it seems if I do not the web developer cannot see it. Am I approaching this the wrong way. Trying to keep the filtering in NAV, as it mimics the way the form works.
If so, how do we set a flowfilter on a page.
Thanks
John
On the employee table I have a flowfilter, Lookup Department Filter, and a flowfield which uses an exist to be set to true if there is a record in an employee jobs table for the department in the flowfilter. The idea being to limit the list to employees who can work for a given department.
In the OnOPenPage trigger we have
SETFILTER("Works for Department", TRUE)
What I need to do is set the LookUp Department Filter to a specific Department and then run the page, so the list is automatically filtered. our web developer has used the following code (which I don’t Understand!)
NAV_EmployeeList_Page.EmployeeList_Service empservice = new NAV_EmployeeList_Page.EmployeeList_Service();
empservice.UseDefaultCredentials = true;
NAV_EmployeeList_Page.EmployeeList_Filter empfilter = new NAV_EmployeeList_Page.EmployeeList_Filter();
empfilter.Field = NAV_EmployeeList_Page.EmployeeList_Fields.DepartmentFilter;//trying to use a flow filter but errors
empfilter.Criteria = "12345";
empservice.ReadMultiple(new NAV_EmployeeList_Page.EmployeeList_Filter[] { empfilter }, null, 0);
I have added the flowfilter as DepartmentFilter to the page, as it seems if I do not the web developer cannot see it. Am I approaching this the wrong way. Trying to keep the filtering in NAV, as it mimics the way the form works.
If so, how do we set a flowfilter on a page.
Thanks
John
0
Comments
-
I have a similar problem. I'm trying to get the item inventory from a specific location using the Item published page.
I've tried to create a Code unit to extend the page functionality passing the specific location to the function but I'm not able to pass the input parameter to the page0
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