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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.03.2008, 21:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
casperkamal: Sending alerts through code without error in Ax
Источник: http://casperkamal.spaces.live.com/B...CD63!376.entry
==============

 
 There was an article sometime back by Helmut on "sending alerts through code"(click to read the article), there was one problem with the code as helmut had quoted
 
    "* you will get an error in the alert form on the second tab"
 
  The error will not crop up if you use the following code....
 
void sendMessageToUsers()
{
    SysMailer           mail;
    UserInfo            UserInfo;
    EventInbox          inbox;
    EventInboxId        inboxId;
    ;
   
    select UserInfo where UserInfo.id == CurUserId();

    inboxId = EventInbox::nextEventId();
   
    inbox.initValue();
    inbox.ShowPopup     = NoYes::Yes;
    inbox.Subject       = "Testing alert via code";
    inbox.Message       = "Hello we are alerting";
    inbox.AlertedFor    = "This alert is just information no links are available";
    inbox.SendEmail     = false;
    inbox.UserId        = UserInfo.Id;
    inbox.TypeId        = classnum(EventType);
    //Give any table and field values
    inbox.AlertTableId  = TableNum(Address);
    inbox.AlertFieldId  = fieldNum(Address ,Name);
    inbox.TypeTrigger   = EventTypeTrigger::FieldChanged;
    inbox.CompanyId     = CurExt();
    inbox.InboxId       = inboxId;
    inbox.AlertCreatedDate = systemdateget();
    inbox.AlertCreateTime  = timeNow();
    inbox.insert();

}
 
 ......  Alert plz Alert


Источник: http://casperkamal.spaces.live.com/B...CD63!376.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
casperkamal: Using record templates in code for Dynamics Ax 4.0. Blog bot DAX Blogs 0 10.05.2008 19:14
casperkamal: A small addition to creation of Table throug x++ code in Dynamics Ax Blog bot DAX Blogs 0 03.04.2007 23:11
casperkamal: Adding a Table field through X++ code in Dynamics Ax Blog bot DAX Blogs 1 02.04.2007 17:05
casperkamal: Sending Emails from Ax Blog bot DAX Blogs 0 28.11.2006 14:10

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

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

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