X++ CODE TO GENERATE ALERT FOR RECORD IN DAX 2011
来源:互联网 发布:阿里云不能开启gpu 编辑:程序博客网 时间:2024/05/20 08:42
X++ CODE TO GENERATE ALERT FOR RECORD IN DAX 2011
EventInbox andEventInboxData are two tables which will store the data related to alerts.
So one can easily generate alert by creating a record in EventInbox for xx user.
The problem with above approach is that alert will be triggered but if the user want to see for which record alert is triggered (by clicking on Go to Origin) than it will fail.
Always remember to make use of helper class in DAX 2011 , whenever you want to use existing feature / functionality from standard product.
Following job illustrates how to use helper class EventNotificationto generate alert for InventTable record !
static void Event_sendAlertByCode(Args _args)
{
EventNotificationSource _source;
EventNotification event = EventNotification::construct(EventNotificationSource::Sync);
InventTable inventTable;
;
inventTable = InventTable::find('B-R14'); // sample record for which alert is shown
event.parmRecord(inventTable);
event.parmUserId(curuserid()); // user for which this alert to be shown
event.parmDataSourceName('InventTable'); //form datasource
event.parmMenuFunction(new MenuFunction('InventTable', MenuItemtype::Display));
event.parmSubject('Test');
event.parmMessage('Test Event alert');
event.create();
}
So one can easily generate alert by creating a record in EventInbox for xx user.
The problem with above approach is that alert will be triggered but if the user want to see for which record alert is triggered (by clicking on Go to Origin) than it will fail.
Always remember to make use of helper class in DAX 2011 , whenever you want to use existing feature / functionality from standard product.
Following job illustrates how to use helper class EventNotificationto generate alert for InventTable record !
static void Event_sendAlertByCode(Args _args)
{
EventNotificationSource _source;
EventNotification event = EventNotification::construct(EventNotificationSource::Sync);
InventTable inventTable;
;
inventTable = InventTable::find('B-R14'); // sample record for which alert is shown
event.parmRecord(inventTable);
event.parmUserId(curuserid()); // user for which this alert to be shown
event.parmDataSourceName('InventTable'); //form datasource
event.parmMenuFunction(new MenuFunction('InventTable', MenuItemtype::Display));
event.parmSubject('Test');
event.parmMessage('Test Event alert');
event.create();
}
0 0
- X++ CODE TO GENERATE ALERT FOR RECORD IN DAX 2011
- Code code to generate code in Dynamics AX
- How to generate UML Diagrams from Java code in Eclipse
- How to generate FLEXIcontent SEF URLs in custom code
- for record in file
- some record in matlab code
- WCF 服务引用生成代码失败 (Failed to generate code for the service reference )
- Custom tool error: Failed to generate code for the service reference ××××××. Please check other erro
- Generate source code jar for Maven
- Find ways to code in Mac OS X
- Custom tool error Failed to generate code
- How to tacktrace In Android for Java code
- automatic generate pdf using shell code in C++ Code
- DbClick to delete record in DataGrid
- Ledger Balance Data in DAX
- How to generate monkeyrunner build-in help?
- How to Generate SQL Trace In OAF
- sqoop No columns to generate for ClassWriter
- (笔记) javascript 继承
- [android源码分析]enable_native中的hci dev注册和up
- Linux下安装Oracle11g服务器_redhat适用
- Hadoop实战-初级部分 之 HDFS
- Activemq使用介绍
- X++ CODE TO GENERATE ALERT FOR RECORD IN DAX 2011
- SQL Server、Oracle、db2所提供的简装版(Express)比较
- Android java file.delete()不成功,返回false
- files_struct 与 struct file
- tool
- [android源码分析]bluetoothd service的启动的总体流程分析
- vmware10与winxp支持d3d9
- 黑马程序员 知识点总结-Java GUI
- 【SHELL】6 Android环境设置