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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.11.2012, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
Malaysia: Storing last form values
Источник: http://axmas.blogspot.com/2012/11/st...rm-values.html
==============


1. In the AOT, find the LedgerJournalTable form, and add the following code to the bottom of its class declaration:

AllOpenPosted showStatus;
NoYes showCurrentUser;
#define.CurrentVersion(1)
#localmacro.CurrentList
showStatus,
showCurrentUser
#endmacro

2. Create the following additional form methods:
public void initParmDefault()
{
showStatus = AllOpenPosted::Open;
showCurrentUser = true;
}


public container pack()
{
return [#CurrentVersion, #CurrentList];
}


public boolean unpack(container _packedClass)
{
int version = RunBase::getVersion(_packedClass);


switch (version)
{
case #CurrentVersion:
[version, #CurrentList] = _packedClass;
return true;
default:
return false;
}
return false;
}


public IdentifierName lastValueDesignName()
{
return element.args().menuItemName();
}


public IdentifierName lastValueElementName()
{
return this.name();
}


public UtilElementType lastValueType()
{
return UtilElementType::Form;
}


public UserId lastValueUserId()
{
return curUserId();
}


public DataAreaId lastValueDataAreaId()
{
return curext();
}


3. Add the following code to the form's run() method right before its super():

xSysLastValue::getLast(this);
AllOpenPostedField.selection(showStatus);
ShowUserCreatedOnly.value(showCurrentUser);

4. Add the following code to the bottom of the form's close() method:

showStatus = AllOpenPostedField.selection();
showCurrentUser = ShowUserCreatedOnly.value();
xSysLastValue::saveLast(this);





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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxtraining: Vendor returns Blog bot DAX Blogs 0 11.10.2012 00:11
dynamicsaxtraining: Paying a Vendor Blog bot DAX Blogs 0 22.03.2012 22:11
dynamicsaxtraining: Purchase Blog bot DAX Blogs 0 11.03.2012 05:25
axhelper: Storing Last Form Values Blog bot DAX Blogs 1 25.10.2010 23:53
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05

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

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

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