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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.11.2012, 14:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Malaysia: Creating a custom instant search filter
Источник: http://axmas.blogspot.com/2012/11/cr...ch-filter.html
==============


1. In the AOT, open the MainAccountListPage form and add a new StringEdit
control with the following properties to the existing Filter group:

Property Value
Name FilterName
AutoDeclaration Yes
ExtendedDataType AccountName
2. Override its textChange() method with the following code:
public void textChange()
{
super();
MainAccount_ds.executeQuery();
}
3. Override the control's enter() method with the following code:

public void enter()
{
super();
this.setSelection(strLen(this.text()), strLen(this.text()));
}
4. Override the executeQuery() method of the MainAccount data source with the
following code:

public void executeQuery()
{
QueryBuildRange qbrName;
qbrName = SysQuery::findOrCreateRange(this.queryBuildDataSource(),
fieldNum(MainAccount,Name));

qbrName.value(FilterName.text() ? '*'+queryValue(FilterName.text())+'*' : SysQuery::valueUnlimited());

super();
}


5. In order to test the search, open General ledger | Common | Main accounts
and start typing in the Account name filter. Notice how the account list is being
filtered automatically:







Источник: http://axmas.blogspot.com/2012/11/cr...ch-filter.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Gareth Tucker: Global Search Add-on Alternatives for Microsoft CRM 2011 Blog bot Dynamics CRM: Blogs 0 24.07.2012 14:11
Microsoft Dynamics CRM Team Blog: Creating an Elegant Codeless Universal Search Blog bot Dynamics CRM: Blogs 0 15.07.2011 19:11
kamalblogs: Creating a custom compiler output type and displaying in the compiler output in Dynamics Ax 2009 Blog bot DAX Blogs 2 06.05.2011 21:50
Microsoft Dynamics CRM Team Blog: Creating Custom Sample Data for Microsoft Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 0 07.01.2011 03:15
Creating Custom Dynamics AX Services Blog bot DAX Blogs 0 17.12.2008 12:05

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

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

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