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
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:
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]