Hi,
I am trying to create a custom alert notification in ax 2012 r2 using this code below.
static void initFromNotificationAlerts(Common _Common)
{
EventInbox EventInbox,inbox;
Invoices _Invoices;
UserGroupList _UserGroupList;
;
_Invoices = _Common;
ttsBegin;
while select _UserGroupList where _UserGroupList.groupId == 'Admin'
{
select maxof(inboxId) from inbox;
EventInbox.InboxId = EventInbox::nextEventId();
EventInbox.CompanyId = _Invoices.dataAreaId;
EventInbox.AlertTableId = _Invoices.TableId;
EventInbox.AlertCreatedDateTime = DateTimeUtil::utcNow();
EventInbox.ParentTableId = _Invoices.TableId;
EventInbox.IsRead = NOYES::No;
EventInbox.Subject = "Contract Invoice Received";
EventInbox.AlertedFor = strfmt("%1",_Invoices.InvoiceStatus);
EventInbox.UserId = _UserGroupList.userId;
EventInbox.ShowPopup = NOYES::Yes;
EventInbox.Visible = NOYES::Yes;
EventInbox.Message = "Invoices Created";
EventInbox.insert();
}
ttsCommit;
}
The result of the code is shown below:
This is what I want to happen. Whenever an alert notification appears upon clicking the notification.
I want to set a specific form where the custom alert notification would go after clicking.
TIA