AX 4.0.
В классе EventActionEmail делаю следующее:
if(.............)
{
userInfo_Resp = SysUserInfo::find(alertBuffer.ResponsibleId);
SysEmailTable::sendMail(eventParameters.AlertTemplateId,userInfo_Resp.Language,userInfo_Resp.Email,mappings,'',xmlParameters,true,userInfo_Resp.Id,true);
}
else
SysEmailTable::sendMail(eventParameters.AlertTemplateId,userInfo.Language,userInfo.Email,mappings,'',xmlParameters,true,eventRule.UserId,true);
В классе EventActionAlert:
if(.......)
userInfo = SysUserInfo::find(eventRule.UserId);
else
{
alertBuffer = inbox.alertBuffer();
userInfo = SysUserInfo::find(alertBuffer.ResponsibleId);
}
inboxId = EventInbox::nextEventId();
inbox.initValue();
inbox.initFromEventRule(eventRule);
if(...........)
inbox.UserId = alertBuffer.ResponsibleId;
inbox.InboxId = inboxId;
...........
Последний раз редактировалось _AxDevel_; 26.05.2009 в 09:44.
|