BPM emailing Blank Title 105893

wow, great thank you. I might be in touch.

Dan

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Nathan
Sent: Friday, December 09, 2011 1:32 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BPM emailing



2 different examples:

Email

for each ttTask where no-lock.

define variable vFrom as character no-undo.
define variable vTo as character no-undo.
define variable vCC as character no-undo.
define variable vSubject as character no-undo.
define variable vBody as character no-undo.
define variable hEmailEx as handle no-undo.
run Bpm/BpmEmail.p persistent set hEmailEx.

assign vFrom = 'bonner.n@...<mailto:%27bonner.n%40totalplastics.com>'.
assign vTo = string( ttTask.CreateDcdUserID + '@...<mailto:%27%40totalplastics.com>' ).
assign vCC = vCC + string( ttTask.ChangeDcdUserID + '@...<mailto:%27%40totalplastics.com>').
assign vSubject = vSubject + 'Your Part has been created'.
assign vBody = vBody + string (ttTask.TaskComment).

run SendEmail in hEmailEx (
false,
CUR-COMP,
vFrom,
vTo,
vCC,
vSubject,
vBody,
string ( ttTask.TaskComment )
).
if valid-handle(hEmailEx) then delete procedure hEmailEx.
leave.
end.

OR

for each ttPOHeader no-lock.

Define variable vPurAuth as character no-undo.
Define variable vAuthID as character no-undo.

Assign vPurAuth = ''.
Assign vAuthID = ''.

Repeat:
Find next PurAgent where (PurAgent.Company = ttPOHeader.Company and PurAgent.BuyerID = ttPOHeader.BuyerID) no-lock.

If available PurAgent then do:

Assign vAuthID = PurAgent.ApprovalPerson.

Repeat:
Find Next PurAuth where (PurAgent.Company = PurAuth.Company and PurAgent.ApprovalPerson = PurAuth.BuyerID) no-lock .

If available PurAuth then do:

Assign vPurAuth = vPurAuth + PurAuth.DcdUserID + "@...; ".

End.

If not available PurAuth then return.

End.

End.

If not available PurAgent then return.

End.

Define variable vAuthName as character no-undo.

Assign vAuthName = ''.

For each PurAgent where PurAgent.BuyerID = vAuthID no-lock.

Assign vAuthName = PurAgent.Name.

Leave.

End.

/*{lib\PublishInfoMsg.i &InfoMsg = "vPurAuth"}.*/

define variable vFrom as character no-undo.
define variable vTo as character no-undo.
define variable vCC as character no-undo.
define variable vSubject as character no-undo.
define variable vBody as character no-undo.
define variable hEmailEx as handle no-undo.
run Bpm/BpmEmail.p persistent set hEmailEx.

assign vFrom = 'vantage@...<mailto:%27vantage%40totalplastics.com>'.
assign vTo = vPurAuth.
assign vCC = vCC + string( ttPOHeader.EntryPerson + '@...<mailto:%27%40totalplastics.com>').
assign vSubject = vSubject + 'PO Num, ' + String(ttPOHeader.PONum) + ' is pending ' + vAuthName + '''s approval'.
assign vBody = vBody + 'Please review PO Num, ' + String(ttPOHeader.PONum) + ' for ' + ttPOHeader.EntryPerson .

run SendEmail in hEmailEx (
false,
CUR-COMP,
vFrom,
vTo,
vCC,
vSubject,
vBody,
String( ttPOHeader.ApprovalStatus )
).
if valid-handle(hEmailEx) then delete procedure hEmailEx.
leave.
end.

Call if you get stuck. 616/717.1613

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "dgodfrey_amc" <dgodfrey_amc@...> wrote:
>
> Thank you. My bad for not noticing.
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "cooner_55421" <cooner_55421@> wrote:
> >
> > Do you mean by using ABL instead of the email template?s
> > If you have access to EpcWeb this tech tip 9923MPS - gives a basic example.
> >
> > https://epicweb.epicor.com/ReportServer/Pages/ReportViewer.aspx?/ePortal/ABDetail&rs:Command=Render&rc:Toolbar=true&Card_ID=9923MPS&Answerbook=Clientele+Change+Requests
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "dgodfrey_amc" <dgodfrey_amc@> wrote:
> > >
> > > Does anyone know how to email inside of BPMs?
> > >
> >
>





[Non-text portions of this message have been removed]
Does anyone know how to email inside of BPMs?
Do you mean by using ABL instead of the email template?s
If you have access to EpcWeb this tech tip 9923MPS - gives a basic example.

https://epicweb.epicor.com/ReportServer/Pages/ReportViewer.aspx?/ePortal/ABDetail&rs:Command=Render&rc:Toolbar=true&Card_ID=9923MPS&Answerbook=Clientele+Change+Requests

--- In vantage@yahoogroups.com, "dgodfrey_amc" <dgodfrey_amc@...> wrote:
>
> Does anyone know how to email inside of BPMs?
>
Thank you. My bad for not noticing.

--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> Do you mean by using ABL instead of the email template?s
> If you have access to EpcWeb this tech tip 9923MPS - gives a basic example.
>
> https://epicweb.epicor.com/ReportServer/Pages/ReportViewer.aspx?/ePortal/ABDetail&rs:Command=Render&rc:Toolbar=true&Card_ID=9923MPS&Answerbook=Clientele+Change+Requests
>
> --- In vantage@yahoogroups.com, "dgodfrey_amc" <dgodfrey_amc@> wrote:
> >
> > Does anyone know how to email inside of BPMs?
> >
>
BAM (Business Activity Manager) has an email alert capability which is easy to trigger. It doesn't handle attachments but neither does the example provided on the EpiWeb.

The file ud/GlbAlert.i provides "hooks" into the email variables so you can customize it as you wish. You can set a variable SendEmail TRUE to continue with the send or FALSE to suppress it.

There is also a Progress smtpmail.p program in the public domain, although it takes a bit of searching to find it (I found it at freeframework.sourceforge.net I think) This program allows for attachments.
Here is a sample of the interface (Pardon the scrogged alignment):

run pny/smtpmail.p (
"e9admin@...", /* from */
pTo, /* to */
"", /* CC */
pAttachment, /* attachment headers */
pAttachment, /* attachment files */
pSubject, /* Subject */
pBody, /* Body */
"", /* mime-header type for body, for html use: type=text/html:charset=us-ascii:filetype=ascii */
output vlOK /* successful */
) no-error.

Cheers!

Christopher Heins
Sr. Progress Programmer/Analyst

Desk# 973-560-5370
Cell# 908-256-3662
Skype: cheins.nj
cheins@...


NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
2 different examples:

Email

for each ttTask where no-lock.

define variable vFrom as character no-undo.
define variable vTo as character no-undo.
define variable vCC as character no-undo.
define variable vSubject as character no-undo.
define variable vBody as character no-undo.
define variable hEmailEx as handle no-undo.
run Bpm/BpmEmail.p persistent set hEmailEx.

assign vFrom = 'bonner.n@...'.
assign vTo = string( ttTask.CreateDcdUserID + '@...' ).
assign vCC = vCC + string( ttTask.ChangeDcdUserID + '@...').
assign vSubject = vSubject + 'Your Part has been created'.
assign vBody = vBody + string (ttTask.TaskComment).

run SendEmail in hEmailEx (
false,
CUR-COMP,
vFrom,
vTo,
vCC,
vSubject,
vBody,
string ( ttTask.TaskComment )
).
if valid-handle(hEmailEx) then delete procedure hEmailEx.
leave.
end.

OR

for each ttPOHeader no-lock.

Define variable vPurAuth as character no-undo.
Define variable vAuthID as character no-undo.

Assign vPurAuth = ''.
Assign vAuthID = ''.

Repeat:
Find next PurAgent where (PurAgent.Company = ttPOHeader.Company and PurAgent.BuyerID = ttPOHeader.BuyerID) no-lock.

If available PurAgent then do:

Assign vAuthID = PurAgent.ApprovalPerson.

Repeat:
Find Next PurAuth where (PurAgent.Company = PurAuth.Company and PurAgent.ApprovalPerson = PurAuth.BuyerID) no-lock .

If available PurAuth then do:

Assign vPurAuth = vPurAuth + PurAuth.DcdUserID + "@...; ".

End.

If not available PurAuth then return.

End.

End.

If not available PurAgent then return.

End.


Define variable vAuthName as character no-undo.

Assign vAuthName = ''.

For each PurAgent where PurAgent.BuyerID = vAuthID no-lock.

Assign vAuthName = PurAgent.Name.

Leave.

End.


/*{lib\PublishInfoMsg.i &InfoMsg = "vPurAuth"}.*/


define variable vFrom as character no-undo.
define variable vTo as character no-undo.
define variable vCC as character no-undo.
define variable vSubject as character no-undo.
define variable vBody as character no-undo.
define variable hEmailEx as handle no-undo.
run Bpm/BpmEmail.p persistent set hEmailEx.

assign vFrom = 'vantage@...'.
assign vTo = vPurAuth.
assign vCC = vCC + string( ttPOHeader.EntryPerson + '@...').
assign vSubject = vSubject + 'PO Num, ' + String(ttPOHeader.PONum) + ' is pending ' + vAuthName + '''s approval'.
assign vBody = vBody + 'Please review PO Num, ' + String(ttPOHeader.PONum) + ' for ' + ttPOHeader.EntryPerson .

run SendEmail in hEmailEx (
false,
CUR-COMP,
vFrom,
vTo,
vCC,
vSubject,
vBody,
String( ttPOHeader.ApprovalStatus )
).
if valid-handle(hEmailEx) then delete procedure hEmailEx.
leave.
end.


Call if you get stuck. 616/717.1613

--- In vantage@yahoogroups.com, "dgodfrey_amc" <dgodfrey_amc@...> wrote:
>
> Thank you. My bad for not noticing.
>
> --- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@> wrote:
> >
> > Do you mean by using ABL instead of the email template?s
> > If you have access to EpcWeb this tech tip 9923MPS - gives a basic example.
> >
> > https://epicweb.epicor.com/ReportServer/Pages/ReportViewer.aspx?/ePortal/ABDetail&rs:Command=Render&rc:Toolbar=true&Card_ID=9923MPS&Answerbook=Clientele+Change+Requests
> >
> > --- In vantage@yahoogroups.com, "dgodfrey_amc" <dgodfrey_amc@> wrote:
> > >
> > > Does anyone know how to email inside of BPMs?
> > >
> >
>