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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 12.04.2019, 19:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Dangerous bug in CustCollectionsPoolsListPage form AX2012/D365
Источник: http://alexvoy.blogspot.com/2019/04/...nspoolsli.html
==============

<div dir="ltr" style="text-align: left;" trbidi="on">There is a form CustCollectionsPoolsListPage where two data sources are outer joined to the root data source with no relations (no links).



If by any reason the initial query does not contain links for these two aforementioned, SQL starts producing a Cartesian product and generating a huge temporary table. The latter can potentially lead to SQL server crash, like it happened in our environment.



The following fix may leave much to be desired but at least it creates needed links in case they are absent.

On CustTable data source we have to add an additional check for the existing query.


public void executeQuery()
{
element.populateAgingIndicators(selectedCustAging);

// Use the query from the cue?
if (!useInitialQuery
// Begin
|| !this.wblCheckQuery(this.query())
// End:
)
{
this.query(element.addOriginalPoolQuery(listPageHelper.getCurrentPoolQuery()));
}


super();

element.setButtonAccess();
element.setGridColumnLabels();
}



<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">// to avoid the cartesian product in case of absent link for this outer join
private boolean wblCheckQuery(Query _query)
{
QueryBuildDataSource custAgingDs;
QueryBuildDataSource custAgingLegalEntityDs;
boolean ret = true;

custAgingDs = _query.dataSourceName(#CustAgingDsName);
custAgingLegalEntityDs = _query.dataSourceName(#CustAgingLegalEntityName);
if (!custAgingDs || !custAgingLegalEntityDs || custAgingDs.linkCount()
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
AX2012-D365 Bug: TrvWorkflowExpLines query misses fields Blog bot DAX Blogs 0 06.04.2019 03:30
dynamicsaxtraining: Vendor returns Blog bot DAX Blogs 0 11.10.2012 00:11
dynamicsaxtraining: Purchase Blog bot DAX Blogs 0 11.03.2012 05:25
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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