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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.03.2011, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
waikeatng: Create Alert using X++ codes
Источник: http://waikeatng.blogspot.com/2011/0...g-x-codes.html
==============

Sometimes Infolog message is not sufficient enough for prompting information to users. It is possible to create alert message using code as an alternative. It is fairly simple to create alert message manually by just inserting a new record in EventTable where all the alert messages are stored. Below is a code snippet for creating alert using code in AX 2009.
X++:
static void CreateAlertUsingCode(Args _args)
{
    EventInbox          inbox;
    ;

    inbox.initValue();
    inbox.ShowPopup     = NoYes::Yes;
    inbox.Subject       = "This is the Alert subject";
    inbox.Message       = "This is the Alert message";
    inbox.AlertedFor    = "This alert is just information no links are available";
    inbox.SendEmail     = false;
    inbox.UserId        = curuserid();
    inbox.TypeId        = classnum(EventType);

    inbox.AlertTableId  = tablenum(Address);
    inbox.AlertFieldId  = fieldnum(Address, Name);
    inbox.TypeTrigger   = EventTypeTrigger::FieldChanged;
    inbox.CompanyId     = curext();
    inbox.InboxId       = EventInbox::nextEventId();;
    inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime();
    inbox.insert();
}



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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Possibilities to create Memory Dumps from crashing processes Blog bot DAX Blogs 0 12.05.2010 19:05
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
dynamicsaxtraining: Create purchase order Blog bot DAX Blogs 0 14.12.2009 14:05
Ruslan Goncharov: A few words about sorting codes Blog bot DAX Blogs 0 18.02.2009 21:05
jerry-dynamics: tax codes Blog bot DAX Blogs 0 16.06.2007 11:20

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

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

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