hi check this it may help u void sendAlertToUsers() { SysMailer mail; UserInfo UserInfo; EventInbox inbox; EventInboxId inboxId; ;
select UserInfo where UserInfo.id == CurUserId(); inboxId = EventInbox::nextEventId(); inbox.initValue(); inbox.ShowPopup = NoYes::Yes; // To show Pop up inbox.Subject = "Aleart Message Through Code"; inbox.Message = "Testing Alerts"; inbox.AlertedFor = "This alert is just for information(Testing)"; inbox.SendEmail = false; inbox.UserId = UserInfo.Id; inbox.TypeId = classnum(EventType); //Enter Table and Field Details inbox.AlertTableId = TableNum(EmplTable); // Table for which Alert is Generated inbox.AlertFieldId = fieldNum(Empltable ,Name); // Field for which Alert is Generated inbox.TypeTrigger = EventTypeTrigger::FieldChanged; inbox.CompanyId = CurExt(); inbox.InboxId = inboxId; inbox.AlertCreatedDate = systemdateget(); inbox.AlertCreateTime = timeNow(); inbox.insert(); } -- Regards Deepankar http://axgeek.blogspot.com/ On 7/15/08, hema_vicky <[EMAIL PROTECTED]> wrote: > > Hi, > > In axapta 3.0, I can send messages to all session users who have > logged as the specific user id. > > The code I used in 3.0 > ---------------------- > int i; > xSession xSession; > ; > for(i=2;i<xSession::maxSessionId();i++) > { > xSession = new xSession(i); > if(xSession.userId()==userid) > { > if (xSession.userId() == CurUserId()) > { > AOSSessionInfo::sendMessage(i,subject,message); > } > } > } > > It was working fine in 3.0. > > But, in 4.0 the AOSSessionInfo class doesn't have the method called > sendMessage. How can i achieve this requirement in 4.0 > > Provide me the solution. Thank you. > - > Hema. S > > >