Below is what I use for an ECO Task. It is on a BAM on Task. I have one for each kind of task we assign.
Save code below as alertname.p into \\servername\Epicordirectory\server\ud\alertname.p<file:///\\servername\Epicordirectory\server\ud\alertname.p>
Call using the same url from the BAM in the Additional Alert Procedure Alert Program
HTH
Greg Payne
Code ---------------------
{ud/GlbAlert.i &TableName = "Task"}
ASSIGN SendEmail = FALSE.
Define Variable lcEmailText as character.
Define Variable lcEmailFrom as character Initial 'info@...':U.
For first SalesRep WHERE Task.SalesRepCode = SalesRep.SalesRepCode AND SalesRep.Company = Task.Company and
Task.SendAlertCreate = TRUE and Task.RelatedToFile = 'ECOGroup' and Task.Complete = FALSE :
Find UserFile where UserFile.DCDUserID = Task.CreateDcdUserID no-lock no-error.
If Available UserFile then Do:
lcEmailFrom = UserFile.EmailAddress.
End.
Message "Debug " + oldTask.key1 + " " + string(oldTask.TaskSeqNum) + " Old Code " + string(oldTask.PriorityCode) + " New Code " + string( Task.PriorityCode).
Find ECOGroup where ECOGroup.GroupID = Task.Key1 and ECOGroup.Company = Task.Company no-lock no-error.
If Available ECOGroup Then Do:
Message "Debug In ECOGroup Avialable " + Task.key1 + " " + string(Task.TaskSeqNum) + " " + Task.TaskDescription + " " + UserFile.EmailAddress.
lcEmailText = " A new task was created for " + SalesRep.Name + " related to ECO " + Task.Key1 +
"~n~nThe task is " + Task.TaskDescription + " ~n~nPlease see the Engineering Workbench or your Task List for further information and to complete this task " +
"~n~n" + ECOGroup.Description .
End.
If Not Available ECOGroup Then Do:
Message "Debug In ECOGroup NOT Avialable " + Task.key1 + " " + string(Task.TaskSeqNum) + " " + Task.TaskDescription + " " + uSERfILE.eMAILaDDRESS.
lcEmailText = " A new task was created for " + SalesRep.Name + " related to ECO " + Task.Key1 +
"~nThe task is " + Task.TaskDescription + " ~n~nPlease see the Engineering Workbench Task List for further information and to complete this task" +
"~n~n".
End.
assign Email-Text = lcEmailText.
If Task.CreateDcdUserID = 'myuser' or Task.ChangeDcdUserID = 'myuser' then Do:
Assign EMAIL-TO = 'user@...'.
End.
Else Do:
assign EMAIL-TO = SalesRep.EmailAddress.
End.
Assign EMAIL-From = lcEmailFrom.
Assign EMAIL-CC = 'user@...'.
Assign EMAIL-Subject = ' ECO ' + Task.Key1 + ' Task ' + Task.TaskDescription.
assign SendEmail = true.
/* End. End find each hd case */
END. /* end for each sales rep */
Stop Code -----------------------------------------
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian Roberts
Sent: Thursday, October 11, 2012 8:54 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Send ECO Alert
You'll need to write a tiny progress ABL program to modify the email,
and select it under "additional alert procedure" in that screen.
Example program:
{ud/GlbAlert.i &TableName = "UserFile"}
ASSIGN Email-Subject = "Epicor Alert: User ":U +
STRING(UserFile.DcdUserID) + " security changed":U.
ASSIGN Email-Text = etc...
Your other alternative is a BPM email, more work but more flexibility.
Brian.
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
Of flyntm
Sent: Wednesday, October 10, 2012 5:23 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Send ECO Alert
I'm hoping somebody has figured this out.
I have created an ECO Workflow Task Set which consists of OPENECO,
APPROVEECO and CLOSEECO. Under APPROVEECO I have several related task
for approvals. I have these setup to Send an Alert when the OPENECO Task
is completed. This appears to work, and the system sends out a "generic"
alert email.
I need to modify this "generic" alert email to add the ECO GroupID.
Does anybody know how to modify the "off the shelf" alert emails? OR
another approach to this little problem?
Thanks for reading!
Flynt at Tidel
[Non-text portions of this message have been removed]
________________________________
CONFIDENTIALITY NOTICE
The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6280 and immediately delete the communication.
"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."
[Non-text portions of this message have been removed]
Save code below as alertname.p into \\servername\Epicordirectory\server\ud\alertname.p<file:///\\servername\Epicordirectory\server\ud\alertname.p>
Call using the same url from the BAM in the Additional Alert Procedure Alert Program
HTH
Greg Payne
Code ---------------------
{ud/GlbAlert.i &TableName = "Task"}
ASSIGN SendEmail = FALSE.
Define Variable lcEmailText as character.
Define Variable lcEmailFrom as character Initial 'info@...':U.
For first SalesRep WHERE Task.SalesRepCode = SalesRep.SalesRepCode AND SalesRep.Company = Task.Company and
Task.SendAlertCreate = TRUE and Task.RelatedToFile = 'ECOGroup' and Task.Complete = FALSE :
Find UserFile where UserFile.DCDUserID = Task.CreateDcdUserID no-lock no-error.
If Available UserFile then Do:
lcEmailFrom = UserFile.EmailAddress.
End.
Message "Debug " + oldTask.key1 + " " + string(oldTask.TaskSeqNum) + " Old Code " + string(oldTask.PriorityCode) + " New Code " + string( Task.PriorityCode).
Find ECOGroup where ECOGroup.GroupID = Task.Key1 and ECOGroup.Company = Task.Company no-lock no-error.
If Available ECOGroup Then Do:
Message "Debug In ECOGroup Avialable " + Task.key1 + " " + string(Task.TaskSeqNum) + " " + Task.TaskDescription + " " + UserFile.EmailAddress.
lcEmailText = " A new task was created for " + SalesRep.Name + " related to ECO " + Task.Key1 +
"~n~nThe task is " + Task.TaskDescription + " ~n~nPlease see the Engineering Workbench or your Task List for further information and to complete this task " +
"~n~n" + ECOGroup.Description .
End.
If Not Available ECOGroup Then Do:
Message "Debug In ECOGroup NOT Avialable " + Task.key1 + " " + string(Task.TaskSeqNum) + " " + Task.TaskDescription + " " + uSERfILE.eMAILaDDRESS.
lcEmailText = " A new task was created for " + SalesRep.Name + " related to ECO " + Task.Key1 +
"~nThe task is " + Task.TaskDescription + " ~n~nPlease see the Engineering Workbench Task List for further information and to complete this task" +
"~n~n".
End.
assign Email-Text = lcEmailText.
If Task.CreateDcdUserID = 'myuser' or Task.ChangeDcdUserID = 'myuser' then Do:
Assign EMAIL-TO = 'user@...'.
End.
Else Do:
assign EMAIL-TO = SalesRep.EmailAddress.
End.
Assign EMAIL-From = lcEmailFrom.
Assign EMAIL-CC = 'user@...'.
Assign EMAIL-Subject = ' ECO ' + Task.Key1 + ' Task ' + Task.TaskDescription.
assign SendEmail = true.
/* End. End find each hd case */
END. /* end for each sales rep */
Stop Code -----------------------------------------
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian Roberts
Sent: Thursday, October 11, 2012 8:54 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Send ECO Alert
You'll need to write a tiny progress ABL program to modify the email,
and select it under "additional alert procedure" in that screen.
Example program:
{ud/GlbAlert.i &TableName = "UserFile"}
ASSIGN Email-Subject = "Epicor Alert: User ":U +
STRING(UserFile.DcdUserID) + " security changed":U.
ASSIGN Email-Text = etc...
Your other alternative is a BPM email, more work but more flexibility.
Brian.
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
Of flyntm
Sent: Wednesday, October 10, 2012 5:23 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Send ECO Alert
I'm hoping somebody has figured this out.
I have created an ECO Workflow Task Set which consists of OPENECO,
APPROVEECO and CLOSEECO. Under APPROVEECO I have several related task
for approvals. I have these setup to Send an Alert when the OPENECO Task
is completed. This appears to work, and the system sends out a "generic"
alert email.
I need to modify this "generic" alert email to add the ECO GroupID.
Does anybody know how to modify the "off the shelf" alert emails? OR
another approach to this little problem?
Thanks for reading!
Flynt at Tidel
[Non-text portions of this message have been removed]
________________________________
CONFIDENTIALITY NOTICE
The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6280 and immediately delete the communication.
"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."
[Non-text portions of this message have been removed]