The problem is that these filters are form specific and only apply to the lookup field. Therefore they are not respected when adding records on the other side of the relationship. When using a Sub-grid or Associated Record View, the user can add any record returned by the view.
At the very least, we need the ability to dynamically add filters to Sub-Grids and Associated Record Views, such that, when users click the "Add Existing" button, the possible records to select are restricted to match the lookup filters on the other end of the relationship.
This could be done by adding the "AddCustomFilter" and "AddCustomView" methods to the GridContext Client Side object. Or perhaps even better, treat the lookup functionality within a Sub-Grid just like an actual Lookup attribute, and provide a "getLookupAttribute" method on the GridContext, which returns a Lookup Attribute object with all of the same functionality as any other Lookup Attribute.
However, I'd much rather not have to write new code in order for this to work as expected. Similar to having the "Related Records Filtering" section in the form editor, there should be a mechanism on the relationship definition itself, which can define restrictions on the valid values, regardless of where the relationship is used.
Comments
The "recent" should aso be adapted to the context of the lookup please (ie show only the recent visited rows that fit with the filters). We had to deactivate the recent feature because it was showing irrelevant rows.
Category: Unified Experience: Search, navigation and performance
this idea would help us a lot and would allow us to avoid using setFilterXml on a subgrid.
Category: Unified Experience: Search, navigation and performance
Administrator on 8/19/2020 5:36:14 PM
Thank you for your feedback. Currently this is not in our roadmap; however, we will track it ,if we get more feedback and votes, we may consider it in the future.
Sincerely,
Meenakshi
PM, Microsoft.