Hello,
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?
@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.
@MEP,
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.
@WhileE
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.
@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.
@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.
Apologies, the code belonged to @gpayne
Looks like I got confused . 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 )
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?
@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)
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?
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?