I have a page that displays expense header records in a list and depending on the user opening the page, different record sets need to be displayed. For instance, when a finance user opens the page, they may wish to see items with a status of "Submitted" or "Approved", but when a manager opens the page, they will need to see claims that have a status of "Pending Approval".
Currently I am creating multiple pages to display data from the same table, but would like to know if I can filter this data before the page is opened, IE setting the SourceTableView depending on who opens the page.
I have added my pages to the MenuSuite and these display exactly as I expect in the RTC. However, maintaining multiple pages that will essentially be performing the same tasks and displaying the same (or very similar data - just filtered differently) is a pain and I wondered if there was any way of pre-filtering the data? It certainly doesn't look like you can from the MenuSuite.
Please understand I am new to NAV development so I appreciate your patience.
Thanks,
Karl
0
Comments
Prior to the advent of MenuSuites in version 4, menus were created using Forms, and you could place your code in the OnPush event of the button, but the MenuSuites did not retain this possibility.
I will take the CodeUnit approach.
I don't mean to open a debate on the subject, but I do find it a little strange that this feature, the ability to set the Source table view, is not available. I suspect this has something to do with licencing and the objects in them.
Looking into the CodeUnit method it would appear I would need a codeunit for each view too.