New extension methods to improve handling of default queries with saved views
Important
This content is archived and is not being updated. For the latest documentation, go to What's new or changed in Finance and Operations apps home page. For the latest release plans, go to Dynamics 365, Power Platform, and Cloud for Industry release plans.
Enabled for | Public preview | General availability |
---|---|---|
Admins, makers, marketers, or analysts, automatically | Feb 6, 2023 | Apr 3, 2023 |
Business value
These extension points allow saved views to behave as users expect in more complex scenarios. The successful usage of views can result in fewer steps in completing business processes and higher user satisfaction.
Feature details
The Saved views feature can be an extremely useful mechanism for users or organizations to optimize the user experience. Data indicates this feature is primarily used today to save queries on list pages, allowing users to quickly return to specific datasets either on page load (when the view is made the default view) or on demand. However, feedback from the community has indicated that view usage on list pages is impeded in some scenarios due to the default handling of the view query in relation to the form query, typically resulting in the default view query not loading and the user receiving a warning or error message.
One common scenario where this occurs is when users navigate to a page where the corresponding menu item has a query defined for the page. In this case, if the default view also contains a query, the page loads using the default menu item query instead of the default view's query, and the user sees this warning message: "The view query has been overridden because of a conflict." This scenario is alluded to by two separate highly voted suggestions in the Ideas portal (see Saved views on pre-filtered forms and Extension of feature "saved views" for more details) and has also been reported to Microsoft through other avenues.
To address the most commonly reported customer concerns and enable users to use views as they expect in more situations, two new extension mechanisms have been added to give form developers more control over the query executed when a page or view is loaded.
The EnableSavedViewQueryPriority method in the FormRunPersonalizationSettings class allows the default view query to have priority over any menu item query.
When the standard platform merging of the view query and the base form query is performed and that process fails, a replaceable OnFailureQueryPersonalizationApply method is now available to give form developers a fallback method for making any needed adjustments to the query so the view can load as expected. Using this method, developers can programmatically adjust the target query as desired so that users have the desired experience.
See also
Saved views (docs)