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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.10.2011, 23:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Kashperuk Ivan: Tutorial: AX2012 - A new way of accessing the QueryBuildDataSource for a particular FormDataSource
Источник: http://kashperuk.blogspot.com/2011/1...accessing.html
==============

When playing with some X++ code, I found an interesting addition that happened in AX 2012 related to form development.

There are 2 new methods that were added to the FormDataSource class, which allow you to very easily and error-free access the underlying QueryBuildDataSource, whether that is for the initial form query or for the queryRun that also contains user filters and sorting.

So, for example, instead of writing:

this.query().dataSourceTable(tableNum(InventTableModule), 2);
this.queryRun().query().dataSourceName(identifierStr(Purch));
....

you can use the 2 new methods:

this.queryBuildDataSource();
this.queryRunQueryBuildDataSource();


It might seem as a very minor improvement, but in reality it greatly simplifies maintenance of code on forms, when new datasources are added or existing ones removed/renamed.

That's all for today.





Источник: http://kashperuk.blogspot.com/2011/1...accessing.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kashperuk Ivan: Tutorial: refresh, reread, research, executeQuery - which one to use? Blog bot DAX Blogs 20 04.04.2017 13:23
Kashperuk Ivan: Tutorial: Table Relation properties in AX 2012 Blog bot DAX Blogs 3 09.05.2011 00:06
Kashperuk Ivan: Tutorial: Undocumented behavior of kernel functions min()/max() Blog bot DAX Blogs 0 24.09.2010 01:06
Kashperuk Ivan: Casing and text search/comparison tutorial Blog bot DAX Blogs 6 25.02.2010 15:41
Kashperuk Ivan: tutorial_Form_Dynalink (a small tutorial on dynalinks) Blog bot DAX Blogs 0 22.08.2007 17:00

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

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

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