The view query has been overridden because of a conflict. New extension points.

Warning: The view query has been overridden because of a conflict.


Occurs 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 above.

To resolve this Microsoft created two additional extension points (development required):
  • EnableSavedViewQueryPriority - this will use a query saved by the user
  • OnFailureQueryPersonalizationApply - this gives the ability to merge the queries
You can catch this even by placing a break point to info.addActionMessageToInfoLog / insertActionMessage
Call stack:

EnableSavedViewQueryPriority

The method should be called on the form init() method before super():

[ExtensionOf(formstr(CredManTable))] final class VKCredManTableFrm_Extension {     public void init()     {         this.GetFormRunPersonalizationSettings().EnableSavedViewQueryPriority();         next init();     }
}
If you want to make that behavior global for all forms or the init method is not hookable (like in the case of the CredManTable form), FormRun can be extended:
[ExtensionOf(classStr(FormRun))] final class VKFormRunCls_Extension {     public void init()     {         if (this.form().name() == formstr(CredManTable))         {             // per specific form         }
        // global         this.GetFormRunPersonalizationSettings().EnableSavedViewQueryPriority();         next init();     }
}

OnFailureQueryPersonalizationApply

A part of the FormRun class and therefore available on the form element level. Definition from FormRun:

    /// <summary>
    /// Extension point used as a fallback method when saved view's was unable to apply query personalizations due
    /// to conflicts with the form's query.
    /// </summary>
    /// <param name = "_sourceQuery">Query object with saved view query personalizations</param>
    /// <param name = "_targetQuery">Query object to be executed</param>
    /// <returns>Method has performed any modifications to the form's query</returns>
    [Replaceable]
    public boolean OnFailureQueryPersonalizationApply(Query _sourceQuery, Query _targetQuery)
    {
        return false;
    }
Called from FormRunConfigurationClass.mergePersonalizationQuery()

We were unable to apply the filters associated with this view due to security restrictions on this page. However, personalizations for this view have been applied.

Links:

 

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units.
Join us.

Blog Tags