Remember also to replace the "curuserid()" with the user id you want the alert to be sent to.
static void sendAlert(Args _args)
{
EventInbox inbox;
EventInboxId inboxId;
inboxId = EventInbox::nextEventId();
inbox.initValue();
inbox.ShowPopup = NoYes::Yes;
inbox.Subject = "Message to online user";
inbox.Message = "Hi team, i want to restart my aos service, please save your work";
inbox.SendEmail = false;
inbox.UserId = curUserid();
inbox.InboxId = inboxId;
inbox.AlertCreatedDate = systemdateget();
inbox.AlertCreateTime = timeNow();
inbox.insert();
}
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment