Custom EventPopUpLinkDestination

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:

test.png

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

Have a look at, \Classes\EventAttentionGrabberParms\onClicked

I already checked the class, how can I use this class for my requirements?

Sorry, I am a beginner. I am willing to learn.

Thankyou.

That method opens the form based on the pop up destination. As per your requirement you may need to have your code there to open your custom form.

So you are trying to say that I will modify the method to meet my requirement?

Yes, as you want a different form to be opened.

Thankyou [mention:d16d1631a7404018a8e6312528e48961:e9ed411860ed4f2ba0265705b8793d05]