Hello,
there is a standard functionality for the notifications for the batch job. You can set up it on the batchjob form by putting a tick opposite to the error event, for instance. The problem is that I get the notification in the AX tray which are shown form table EventInbox on the grid of the form EventAlertInbox. But SendEmail field in the table EventInbox isn't ticked. Because of that I don't get an email which I expect. I can't debug and see where the tick is put in the code because the record in the table EventInbox is created at the moment when the batchjob is run on the AOS server. I have checked where EventInbox.SendEmail field is ticked via cross references. I have found several classes.
For instance, class EvenNotificationSync,create()
userInfo = SysUserInfo::find(inbox.UserId);
if(userInfo && userInfo.EventWorkflowTasksInEmail)
{
inbox.EmailRecipient = userInfo.Email;
inbox.SendEmail = true;
this.sendMail();
}
inbox.insert();
return inbox.InboxId;
As we can see eventinbox.sendemail field is ticked only if field EventWorkflowTasksInEmail in the table SysUserInfo is ticked for my UserId. I have checked SysUserInfo fields for my userid and ticked this field.
But I still get the record in EventInbox with the field SendEmail equal to false when the batchjob ends with an error. Is there any means to somehow debug the code exactly during batchjob running on AOS server?
I'm at dead end right now. Does anybody know where to dig to?
Thanks.