Two ListParts on one Card Page with dependencies

AK
Member Posts: 226
Hi,
I need to add a Listpart to the Jobs Card Page, wich represents several departments involved in the job. A second Listpart should show the Job Tasks, but only those belonging to the department currently selected in the department Listpart. So when a different Department is selected, different Job Tasks are displayed.
I already have the function in the Card Page that would filter the Job Tasks according to the department selected, but how do I trigger it?
Any suggestions are welcome!
I need to add a Listpart to the Jobs Card Page, wich represents several departments involved in the job. A second Listpart should show the Job Tasks, but only those belonging to the department currently selected in the department Listpart. So when a different Department is selected, different Job Tasks are displayed.
I already have the function in the Card Page that would filter the Job Tasks according to the department selected, but how do I trigger it?
Any suggestions are welcome!
0
Best Answer
-
Never mind, found this: https://dynamicsuser.net/nav/b/mark_brummel/posts/tip-2-nav-2009-linked-subpages5
Answers
-
Hi,
I am not 100% sure I understand what you want to achieve, but from what I understood, I would suggest
in the department Listpart on the trigger AfterGetCurrRrecord, you put your code to populate the second listpart. In my opinion this should work.
You can call the function from a subpage by using
CurrPage.Departmentlistpart.FORM.GetSelectedRec(selectedILE);
where Departmentlistpart is the name in properties for Department listpart.
Another option would be to use a listpart based on a temporary table. Take a look at the page property SourceTable temporary.
I hope this helps.0 -
Thanks, but I think this will not work. I've no access to Navision at the moment, so I can't test your idea, but IIRC I don't have any access to the second ListPart from the first one. Only from the card form.
Although I already implemented a function like you suggested in the first ListPart to get the current record, I can only call this function from the CardPage. And this is the problem. The CardPage has to call this function when the current record in the ListPart changes, but it doesn't know when this happens.
Events would be ideal for this if the CardPage could suscribe to the OnGetCurrentRecord event of the ListPart, but this seems not possible. Or is it?
Although it would be possible to use a timer event on the CardPage to poll the current record of the ListPart periodically, this would be an evil hack and I don't like to use such stuff.
0 -
Never mind, found this: https://dynamicsuser.net/nav/b/mark_brummel/posts/tip-2-nav-2009-linked-subpages5
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