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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.05.2010, 00:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
axaptapedia: Call-back methods
Источник: http://www.axaptapedia.com/Call-back_methods
==============

Summary: New page: ==Call-back methods== Sometimes it is useful to call methods on the parent/caller of your class. If you are using the runbase framework you can call accessors methods from the form that c...

==Call-back methods==
Sometimes it is useful to call methods on the parent/caller of your class.

If you are using the runbase framework you can call accessors methods from the form that called your run method to initialize a new object.

X++:
public static void main(Args _args)
{
    str callerName;
    ;
    if(_args.caller() != null)
    {
        callerName = _args.caller().name();

        if(_args.dataset() == tableNum(BankAccountTrans) &&
            formHasMethod(_args.caller(), identifierStr(bankAccountStatement)))//check the form for an accessor method for the statement
        {
            statement = _args.caller().bankAccountStatement();//get the bankStatment from the accessor method 
            engine = new BankRecEngine(_args,_args.record(), statement.AccountId);//create a new runbase, fill params from the form calling this runbase

            if(engine.prompt())//ask the user for information
            {
                engine.run();
            }
       }

    }
}


Источник: http://www.axaptapedia.com/Call-back_methods
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: Accessor Methods Generator Blog bot DAX Blogs 0 05.03.2010 17:05
Dynamic Methods Microsoft CRM: Setting Notes back to Auto Expand Blog bot Dynamics CRM: Blogs 0 13.08.2009 15:05
SysDictCoder: X++ method call performance Blog bot DAX Blogs 1 04.05.2009 22:13
axaptapedia: Table Methods Generator Blog bot DAX Blogs 0 13.02.2009 02:05
AIFFault class AX2009 get all errors back in webservice call axstart DAX in English 0 28.01.2009 19:02

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

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

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