RE: Extension of AOT Query
No! These aren't many questions, just one!
I have XDS that runs on the HcmWorker table, limiting data access by employee position to the department where he was hired.
We also have workers who have been made redundant, they don't have a department because they don't have a position. Or employees who have not been assigned a position.
An example would be Query HcmWorkerListPage_PastWorkers, this query was built in AOT and is called from menuitem.
In 2012, I would have walked it differently, but these is my first steps in Dynamics 365, so I have no idea what to do to make the user see such an old employee without an assigned department.