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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.09.2008, 03:23   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Kashperuk Ivan: SysInfoAction class description - Improve your Infolog
Источник: http://kashperuk.blogspot.com/2008/0...n-improve.html
==============

In the last couple of weeks I have been asked about this a number of times, so I decided it would be a good idea to describe what the class can do for you.

In just a few words, this class helps you interact with your users better, helping them perform some desired action (predefined) on request. This will save some time for the user, providng for a better user

There is a number of classes already present in the system.
Just to name a few used the most:

JournalInfoAction - allows navigating to the specified journal line. This is used, for example, when checking the journal lines before posting.
SysInfoAction_Editor - opens the editor in the specified method on the specified line/column. Primarily used for development purposes.
SysInfoAction_FormRun - opens a specified form, setting focus to a specific control, if required. There are many extensions of this class, allowing for more control over what is to happen.
SysInfoAction_MenuFunction - same as the one above, but the input is a menu item that is to be launched on user action.
SysInfoAction_newWindow,SysInfoAction_AOTproperties - both are used to ease up the dev's life a bit. The first one opens the specified AOT object in a new window, the latter one - the properties for the object.

And so on...

I had to create one extension of this class yesterday as well, while doing a small tool we use inside our team. The requirements were to launch a specific external application, specifying a number of files as command-line arguments. WinAPI ShellExecute can do exactly that. So I create a simple wrapper around the WinApi::ShellExecute method that is accessible as an infolog action.

Here is an example of how this class can be used:



You can download the class from axaptapedia.

The output of the infolog, in this case, would look similar to this:




One other thing worth mentioning about these classes is the method infolog.infoActionObject(). This is not used as often, but provides a greater control over the infolog action by allowing interaction with an open object, like a form.
This is used in AX journals (Inventory Transfer journal, for a specific example, if you wish). Whenever you check the lines of the journal (before posting), you get an infolog in case of errors, which allows to navigate to the specific line with the error. The navigation occurs in the journal lines form currently open, which is much better than opening a new form for each line.
In order to use this, simply specify the object that needs to be available when executing the infolog action, using the method mentioned above, like the following:
infolog.infoActionObject(this); //if called from the method on a class/form, for example
For more information, check out the article on Axaptapedia (I hope it will get expanded over time :))

Источник: http://kashperuk.blogspot.com/2008/0...n-improve.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
За это сообщение автора поблагодарили: Romb (1).
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kashperuk Ivan: SysFormEnumComboBox - class allowing to show only some of the values for a comboBox Blog bot DAX Blogs 0 28.04.2008 19:05
Kashperuk Ivan: List panels in Dynaics AX - a short description of SysListPanel class Blog bot DAX Blogs 1 21.10.2007 22:51
Kashperuk Ivan: A bug in validation of methods' access modifiers and class abstract modifier Blog bot DAX Blogs 0 27.06.2007 21:40
Kashperuk Ivan: Description of ClassBuild class:Today I want to ... Blog bot DAX Blogs 0 26.01.2007 05:51
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

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

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

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