Email Alerts text

I have set up a task work flow for Case Entry. I have enabled email alerts and so far it is mostly working.
The problem is that the email alert does not indicate where the task was created.

The email comes through ok, but only has the name of the task and not the Case number.

Anyone know how the modify the setup to include the case number in the email alert?

Any comments much appreciated.

@MEP have you considered creating a BPM for that?

@brandtley, thanks for your reply.

I do have a BPM. The Global alert is enabled and is sending alerts to the alert queue. The BPM is picking them up and sending the emails.


What I don’t know is how to get the email to include the Case number (or the source that created the alert)


@MEP I have a few questions. Is this a method or data directive? How is the whole BPM setup? If you can explain how it is setup, I may be able to help you.

1 Like

I use a Data Directive to create specific email messages within Epicor to be distributed. I began using the Global Alerts, but found I could not always have the email contain the information I needed to convey.
For example, I have an email that is distributed to our A/P team, when an employee is InActivated or Terminated, as A/P needs to InActivate the Supplier record so the ex-employee does not accidentally get paid for expenses in the future.
The data directive checks on the Employee Status and if the EMPSTATUS field is not equal to “A”, the directive runs my custom code to create and distribute the email message. I can send a screen shot of the code to set-up the email message, if you wish.

This is a Data directive. A standard BPM on Alert.Update.

It sounds like you have a all round better solution with more control over the email information.
If you are able to post the code that would be great. It might help me and others.


@MEP I’m not well versed with Case Management, but my understanding, is alerts are sent based on Tasks added, updated and deleted on cases, correct?

@MEP Here is a sanitized routine to get you started of what I send on a DD for case tasks.

Email Alert on HDCase Task sample.cs (3.7 KB)
EDIT: Code was reuploaded after I found it had a bad if condition not properly removed.


Nice Greg!

As requested, this is a screen shot of the data directive I use to create an email message:


Thanks for the replies.

@brandtley - I assume that in the BPM workflow designer you are replacing the ‘send email’ with ‘execute custom code’?
I have been looking at your code and have tweaked it to suit my needs, but I am not an expert here. I am getting an error with part of the code and am not sure how to fix it.


any ideas?

In Kinetic, tt tables were replaced with datasets.

uBAQ BPM - Custom Code Help - ERP 10 - Epicor User Help Forum (

1 Like

@MEP did you mean to reply to @WhileE? I can’t seem to think of a way you could link AlertQue to Task. What if you triggered based on something else using a Method Directive? It would give you a lot more information to work with. What different actions in Case Entry are triggering alerts?

@MEP That looks like my code and it is on a Standard Data Directive of the Task table.

@Mark_Wonsil I went to our 2021.2.10 assuming I would see that the ttTask had been changed to ds.Task as most of my routines had been converted, but it was still ttTask. :man_shrugging:


1 Like

Apologies, the code belonged to @gpayne
Looks like I got confused :smile:. Let’s start again.

I need to send an email alert when a task is created on Case entry. Sending it to the email the task is assigned to.

Originally I was using the global alert (1390) to send the alert to the Alert Que, then using a Data Directive BPM on the alert Que to send an email to the assigned person.

The problem is the limited information available in the alert que to be used in the email.

It looks like the suggestion is to scrap the global alert and instead use a BPM directly on the Task table. I looked at the available methods, but couldn’t decide on which one.
@gpayne is suggesting a data directive.

I added a standard BPM to the task table. Set a condition that triggers when a row is added to the task table. Then linked the true output of the condition to an execute custom code.
I then copied in Greg’s code, carefully adjusted it (I mean butchered it :slight_smile: )
Saved and enabled the BPM. Tested it and…nothing!

I must have something wrong. Most likely I ruined some perfectly good code. Sorry!

Does it sound like I am on the right track or not?

Thanks for your patience.

@MEP It is a place to start. The Log.WriteEntrys will write to the Appserver Event Viewer and the serverlog if you have that on. The code checks for added so you don’t need a condition.
The event viewer should at least show the starting and ending lines if the routine fired at all.

Looking at the code I uploaded it appears I pre-butchered it taking out some odd conditions we have. Here is code that should fire after you change just the email addresses and user to your user.
Email Alert on HDCase Task sample.cs (3.7 KB)

Hey Greg,

I appreciate you helping me, I know it’s a struggle.

Thank you for the amended code. I have installed it on the task table. A data directive with a standard BPM to execute custom code.
I have emended your code to use my own email addresses, but not adjusted anything else until I can get it working.
I have enabled the BPM and tested by adding a new case entry which creates a new task. I can see the task is enable and exists in the task list, but there is no email alert.

I have enabled tracing and reviewed the log, but cannot see any reference to the BPM.

I guess I still have something wrong. Where should I see the log entry, as I seem to not know?


@MEP No worries this is how we learn. Does the task have send alert create checked?

Standard DD on Task

These are the event viewer lines generated if the email is sent. You should at least get Starting and Ending if it fires at all.

1 Like

@gpayne Thanks

Yes the task has the send alert create checked


As for the event log. I had assumed I would see this in the windows event viewer, but I cannot find any mention of IceAppServer anywhere.
Am I looking in the wrong place?