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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.06.2014, 01:19   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: How to deactivate security policy in AX 2012 RTM for a query only due to tuning performance
Источник: http://blogs.msdn.com/b/axsupport/ar...rformance.aspx
==============

Here is an example on how to increase performance by temporarily deactivating a query used to show open vendor invoices:

Open table Table VendTrans in AOT and expand methods and customize the method existsVendPaymReconciliationImport_SEBG() as follows:

///

/// This source code is freeware and is provided on an "as is" basis without warranties of any kind,

/// whether express or implied, including without limitation warranties that the code is free of defect,

/// fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of

/// the code is with the end user.

///

///

/// Determines if the VendPaymReconciliationImport_SEBG is being used as a return format on an open vendor invoice.

///

///

/// True if the VendPaymReconciliationImport_SEBG is being used as a return format on an open vendor invoice.

///

public static boolean existsVendPaymReconciliationImport_SEBG()

{

VendTrans vendTrans;

VendTransOpen vendTransOpen;

VendPaymModeTable vendPaymModeTable;

boolean isFound;

//MSFT Support - 2 lines added to bypass GAB security

XDSServices xds = new XDSServices();

#DirParty

//MSFT Support - 1 line added below, bypass GAB security.

xds.setXDSContext(0, #InvalidContextString);

select firstonly RecId from vendTransOpen

exists join vendTrans

where vendTrans.RecId == vendTransOpen.RefRecId

exists join vendPaymModeTable

where vendPaymModeTable.PaymMode == vendTrans.PaymMode

&& vendPaymModeTable.ClassIdReturn == classNum(VendPaymReconciliationImport_SEBG);

// 1 line added below, revert back the security

xds.setXDSContext(0, '');

isFound = (vendTransOpen.RecId != 0);

return isFound;

}




Источник: http://blogs.msdn.com/b/axsupport/ar...rformance.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Translated User Help on TechNet and downloadable New Features lists available! Blog bot DAX Blogs 0 31.01.2013 05:11
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
emeadaxsupport: How to copy a budget to a new budget in AX 2012 using Excel Add-in Blog bot DAX Blogs 0 27.11.2012 15:11
emeadaxsupport: AX 2012 Retail: How to enable tracing in AX 2012 Retail Blog bot DAX Blogs 0 07.08.2012 15:11
emeadaxsupport: Dynamics AX 2012 Services: How to process big messages using File adapter Blog bot DAX Blogs 0 03.07.2012 00:12

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

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

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