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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.10.2009, 20:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
Dynamics AX Sustained Engineering: Performance issue in "Open Transaction Edit" form
Источник: http://blogs.technet.com/dynamicsaxs...edit-form.aspx
==============



SE has noticed a performance issue in “Open Transaction Edit” form (AP >> Vendor Details form >> "Open Transaction Editing") in AX 2009 SP1. Post our investigations, we see that much time is consumed sizing the grid columns. Implementing a customization on the VendOpenTrans form will significantly reduce the time needed to open the form. ON test results from our end , we saw an improvement from 60 seconds to 11 seconds post implementing this customization .



Please note that you can also utilize the customization on various other forms that pose the same impact in performance reasons. Below are details on how to work around this issue by making changes to the \forms\VendOpenTrans with some code snippets given below.



Pre requisite : Ensure to have KB 968397 installed on both the client & server. This KB is also included Ax 2009 SP1 Roll-up 2 and is available here



Code snippets :



\Forms\VendOpenTrans\Designs\Design\[Tab:TabControl]\[TabPage:OverviewTab]\[Grid:OverviewGrid]



Change the AutoDeclaration Property from No to Yes.



The code snippet below contains an addition of “overviewGrid.autoSizeColumns(false)” which was a kernel method that was introduced by the referenced KB 968397 fix.



\Forms\VendOpenTrans\Designs\Design\[Tab:TabControl]\[TabPage:OverviewTab]\[Grid:OverviewGrid]







super();



overviewGrid.autoSizeColumns (false); //added line



switch (originator.TableId)





The Company info table is updated:

A new field is added called DataArea which uses extended data type “CompanyID



Method initValue() has 1 line added to populate the new field when a new company record is created.

void initValue()

{



super();

this.dataAreaId = this.dataAreaId; //line added

this.LanguageId = new Session().interfaceLanguage();

}



Secondly the entire CustVendOpenTransBalances.initCustVendBalanceMst() method is re-written as follows:



///

/// Initializes the posted customer or vendor balance in the monetary standard (MST) currency.

///

///

/// The customer or vendor account number that is used to initialize the balance.

///

///

/// A Boolean value that indicates whether to initialize the posted customer balance or the vendor

/// balance.

///

protected void initCustVendBalanceMst(AccountNum _custVendAccount, boolean _isCustomerAccount)

{

DirPartyId custVendPartyId;

CustVendTrans custVendTrans;

CustTrans custTrans;

VendTrans vendTrans;

CustVendTable custVendTable;

CustTable custTable;

VendTable vendTable;

CurrencyCode transMstCurrency;

Amount transMstBalance;

CurrencyExchHelper currencyExchHelper;

CompanyInfo companyInfo;



changecompany(custVendCompany)

{

if (_isCustomerAccount)

{

custTable = CustTable::find(_custVendAccount);

custVendPartyId = custTable.PartyId;

custVendTrans = custTrans;

custVendTable = custTable;

}

else

{

vendTable = VendTable::find(_custVendAccount);

custVendPartyId = vendTable.PartyId;

custVendTrans = vendTrans;

custVendTable = vendTable;

}

}



// Initialize currency exchange helper

currencyExchHelper = CurrencyExchHelper::construct();

currencyExchHelper.parmCompany(displayCompany);



while select crossCompany:sharedServiceCompanies sum(AmountMst), CurrencyCode, AccountNum from custVendTrans

order by companyInfo.CurrencyCode asc

group by companyInfo.CurrencyCode

join DataArea, CurrencyCode from companyInfo

where companyInfo.DataArea == custVendTrans.dataAreaId

exists join AccountNum, PartyId from custVendTable

where custVendTable.AccountNum == custVendTrans.AccountNum

&& custVendTable.PartyId == custVendPartyId

{

transMstCurrency = companyInfo.CurrencyCode;

transMstBalance = custVendTrans.AmountMST;



// Convert to the company currency of the display company using the system date and the display company exchange rate, if necessary

if (transMstCurrency != displayMstCurrency)

{

if (Currency::existByCompany(displayCompany, transMstCurrency))

{

// Calculate the balance from the transaction company if its currency exists in the display company.

currencyExchHelper.parmCurrency(transMstCurrency);



transMstBalance = currencyExchHelper.calculateAmountCurToMst(transMstBalance, true);

}

else

{

// Otherwise the balance from that company should not be added to the total.

transMstBalance = 0;

}

}



custVendBalanceMst += transMstBalance;

}

}





Источник: http://blogs.technet.com/dynamicsaxs...edit-form.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: List of fixes that improve performance of certain features in Dynamics AX 2009 Blog bot DAX Blogs 0 13.10.2009 19:06
Dynamics AX Sustained Engineering: Microsoft Dynamics AX 4.0 and AX 2009 are compatible with Microsoft Windows 7 and Microsoft Windows Server 2008 R2 Blog bot DAX Blogs 0 22.09.2009 04:06
Dynamics AX Sustained Engineering: Dynamics AX 2009 Patching Blog bot DAX Blogs 0 08.10.2008 10:05
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Inside Dynamics AX 4.0: Transaction Semantics Blog bot DAX Blogs 0 31.10.2007 23:40
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 15:12.