Bill:
Here is a quick workup from the orderrel_dropship.p that is in the file list and some of my favorite elements I use in BAM alerts. This has not been tested and you will have to change the vBody section to your content.
Place the file in \\appserver\Epicor directory\server\ud\alertfile.p this is what you will reference in the BAM.
Errors will show in the appserver log as well as the message statements. I use a text file viewer called LTFViewer that can have the log file open while in use, so I can always see the latest debug messages and errors.
HTH
Greg Payne
---------------------------------------------------
{ud/GlbAlert.i &TableName = "OrderRel"}
assign SendEmail = false.
Define variable Planner as character no-undo.
define variable EmailAddress as Character no-undo initial '':U.
define variable UserName as Character no-undo initial '':U.
define variable vFrom as character no-undo initial '':U.
define variable vTo as character no-undo initial '':U.
define variable vCC as character no-undo initial '':U.
define variable vSubject as character no-undo initial '':U.
define variable vBody as character no-undo initial '':U.
Find UserFile where UserFile.DCDUserID = DCD-UserID no-error.
assign EMAIL-From = UserFile.EmailAddress.
Find First OrderHed Where OrderHed.company = OrderRel.company AND OrderHed.OrderNum = OrderRel.OrderNum no-lock no-error.
find Part where Part.Company = OrderRel.Company and Part.PartNum = OrderRel.PartNum no-lock no-error.
find ProdGroup where ProdGroup.Company = OrderRel.Company and ProdGroup.PartNum = OrderRel.PartNum no-lock no-error.
Find UserFile where UserFile.DCDUserID = ProdGrup.PersonID no-error.
assign vTo = UserFile.EmailAddress
Planner = UserFile.Name.
IF OrderHed.OrderHeld = FALSE and OrderRel.Firm = true
THEN DO:
/* Create the new body of the email */
Assign vBody = "new Order for " + OrderRel.PartNum + " for " + Planner +
"~n~n~tItem " + OrderRel.PartNum +
"~n~n~tQty " + trim(string(OrderRel.OurReqQty)) +
"~n~n~tOrder Number: " + string(OrderRel.OrderNum) + "~tLine Number: " + string(OrderRel.OrderLine).
vCC = "info@...;". /* CC to check out alert */
/* Exampes of formatting and conditions */
/*
"~n~n~tMA Cost ~t" + string(Part.StdMaterialCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + trim(string(Part.StdMaterialCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) +
"~n~tPO Cost ~t" + string(OrderRel.UnitCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + TRIM(string(OrderRel.UnitCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) +
if (CostAtPO - CostAtStd) > 50 then do:
assign vTO = vTO + "info@...;".
end.
if (CostAtPO - CostAtStd) > 1000 then do:
assign vCC = vCC + "sales@...;".
end.
*/
Message "DEBUG Email - vTO = " + vTO.
EMAIL-To = vTO.
EMAIL-CC = vCC + EMAIL-From.
assign EMAIL-Subject = 'Epicor Order: '.
assign EMAIL-Text = vBody.
assign SendEmail = true.
END.
ELSE DO:
assign SendEmail = false. /* Do Not send Alert */
END.
--------------------------------------------------------------------------
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
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."
Here is a quick workup from the orderrel_dropship.p that is in the file list and some of my favorite elements I use in BAM alerts. This has not been tested and you will have to change the vBody section to your content.
Place the file in \\appserver\Epicor directory\server\ud\alertfile.p this is what you will reference in the BAM.
Errors will show in the appserver log as well as the message statements. I use a text file viewer called LTFViewer that can have the log file open while in use, so I can always see the latest debug messages and errors.
HTH
Greg Payne
---------------------------------------------------
{ud/GlbAlert.i &TableName = "OrderRel"}
assign SendEmail = false.
Define variable Planner as character no-undo.
define variable EmailAddress as Character no-undo initial '':U.
define variable UserName as Character no-undo initial '':U.
define variable vFrom as character no-undo initial '':U.
define variable vTo as character no-undo initial '':U.
define variable vCC as character no-undo initial '':U.
define variable vSubject as character no-undo initial '':U.
define variable vBody as character no-undo initial '':U.
Find UserFile where UserFile.DCDUserID = DCD-UserID no-error.
assign EMAIL-From = UserFile.EmailAddress.
Find First OrderHed Where OrderHed.company = OrderRel.company AND OrderHed.OrderNum = OrderRel.OrderNum no-lock no-error.
find Part where Part.Company = OrderRel.Company and Part.PartNum = OrderRel.PartNum no-lock no-error.
find ProdGroup where ProdGroup.Company = OrderRel.Company and ProdGroup.PartNum = OrderRel.PartNum no-lock no-error.
Find UserFile where UserFile.DCDUserID = ProdGrup.PersonID no-error.
assign vTo = UserFile.EmailAddress
Planner = UserFile.Name.
IF OrderHed.OrderHeld = FALSE and OrderRel.Firm = true
THEN DO:
/* Create the new body of the email */
Assign vBody = "new Order for " + OrderRel.PartNum + " for " + Planner +
"~n~n~tItem " + OrderRel.PartNum +
"~n~n~tQty " + trim(string(OrderRel.OurReqQty)) +
"~n~n~tOrder Number: " + string(OrderRel.OrderNum) + "~tLine Number: " + string(OrderRel.OrderLine).
vCC = "info@...;". /* CC to check out alert */
/* Exampes of formatting and conditions */
/*
"~n~n~tMA Cost ~t" + string(Part.StdMaterialCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + trim(string(Part.StdMaterialCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) +
"~n~tPO Cost ~t" + string(OrderRel.UnitCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + TRIM(string(OrderRel.UnitCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) +
if (CostAtPO - CostAtStd) > 50 then do:
assign vTO = vTO + "info@...;".
end.
if (CostAtPO - CostAtStd) > 1000 then do:
assign vCC = vCC + "sales@...;".
end.
*/
Message "DEBUG Email - vTO = " + vTO.
EMAIL-To = vTO.
EMAIL-CC = vCC + EMAIL-From.
assign EMAIL-Subject = 'Epicor Order: '.
assign EMAIL-Text = vBody.
assign SendEmail = true.
END.
ELSE DO:
assign SendEmail = false. /* Do Not send Alert */
END.
--------------------------------------------------------------------------
> **[Non-text portions of this message have been removed]
>
>
> I am trying to set up a global alert to inform the production planer
> that a new customer order has been entered.
>
> In Business Activity Manager, I select the OrderHed table.
>
> Under action, I select Send alert and click on the Related button, but
> it only shows Sales Force under Available roles.
>
> How do I add Production Planner role to the choices?
>
> Regards,
>
> Bill Turgeon
>
> Director, Information Technology
>
> Coto Technology, Inc.
>
> 66 Whitecap Drive
>
> North Kingstown, RI 02852
>
> Ph: 401-583-7223
>
> Cell: 401-368-9938
>
> Fax: 401-942-0920
>
> E-mail: bturgeon@... <mailto:jbentley@...>
>
>
> P Please consider the environment before printing this email.
>
> This e-mail and any attachments are for the sole use of the intended
> recipients and may be privileged or confidential. Any distribution,
> printing or other use by anyone else is prohibited. If you are not an
> intended recipient, please contact the sender immediately, and
> permanently delete this e-mail and attachments.
>
> [Non-text portions of this message have been removed]
>
>
>
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
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."