AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 02.02.2024, 21:26   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: The view query has been overridden because of a conflict. New extension points.
Источник: http://daxonline.org/1939-the-view-q...on-points.html
==============

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 NXRFormRunCls_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:



/// /// 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. /// /// Query object with saved view query personalizations /// Query object to be executed /// Method has performed any modifications to the form's query [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:
https://learn.microsoft.com/en-us/dy...es-saved-views



Источник: http://daxonline.org/1939-the-view-q...on-points.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mfp: New extension points Blog bot DAX Blogs 6 17.10.2018 12:54
Dynamics NAV Faster & Better: Small query to view Nav extension objects Blog bot NAV: Blogs 0 03.08.2018 18:11
stoneridgesoftware: How to use a View to Simplify Working with Query Classes in Dynamics AX Blog bot DAX Blogs 0 26.05.2016 18:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:35.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.