Vantage 8.03.405a BPM Custom Email Message

Surely you jest.....

You have to write your own 4Gl code if you want to include the user that caused the BPM to fire, or if a change happens on a sales order line and you want to include all lines in the message.....

poking around and seeing what the 'wizards' create in the .p files is the only 'docs' I have found :o)



--- In vantage@yahoogroups.com, "Brian W. Spolarich " <bspolarich@...> wrote:
>
> So you can send custom e-mail messages from BPM 4GL actions?!?!
>
> Where's the docs on that?
>
> -bws
>
> --
> Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
> Â Â Â Â bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of bw2868bond
> Sent: Thursday, July 23, 2009 2:35 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Vantage 8.03.405a BPM Custom Email Message
>
> Anyone using 4GL Action to send custom email message (because wizard is so limited)?
>
> If so, do you have any luck getting the message to send asynchronously?
>
> If I set the Async parameter to true, the message never seems to get sent and when I use false, the user has to wait while the message sends....
>
> run SendEmail in EMhEmailProc (
> false,
> CUR-COMP,
> EMfrom,
> EMto,
> EMcc,
> EMsubject,
> EMbody,
> "":U
> ).
>
>
>
> ------------------------------------
>
> 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
>
Anyone using 4GL Action to send custom email message (because wizard is so limited)?

If so, do you have any luck getting the message to send asynchronously?

If I set the Async parameter to true, the message never seems to get sent and when I use false, the user has to wait while the message sends....

run SendEmail in EMhEmailProc (
false,
CUR-COMP,
EMfrom,
EMto,
EMcc,
EMsubject,
EMbody,
"":U
).
Asynchronous scheduling requires you to create a task which then in turn
I believe needs to be scheduled using the system agent maintenance...



Rob Bucek

Manufacturing Engineer

PH: (715) 284-5376 ext 3111

FAX: (715)284-4084

<http://www.dsmfg.com/>

(Click the logo to view our site) <http://www.dsmfg.com/>





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of bw2868bond
Sent: Thursday, July 23, 2009 1:35 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Vantage 8.03.405a BPM Custom Email Message





Anyone using 4GL Action to send custom email message (because wizard is
so limited)?

If so, do you have any luck getting the message to send asynchronously?

If I set the Async parameter to true, the message never seems to get
sent and when I use false, the user has to wait while the message
sends....

run SendEmail in EMhEmailProc (
false,
CUR-COMP,
EMfrom,
EMto,
EMcc,
EMsubject,
EMbody,
"":U
).





[Non-text portions of this message have been removed]
I've managed to get this working.

One action: synchronously execute 4GL code... record nothing

The code is:

define variable Email_from as character no-undo initial '':U.
define variable Email_to as character no-undo initial '':U.
define variable Email_cc as character no-undo initial '':U.
define variable Email_subject as character no-undo initial '':U.
define variable Email_body as character no-undo initial '':U.
define variable Email_hEmailProc as handle no-undo.
run Bpm/BpmEmail.p persistent set Email_hEmailProc.

define variable Email_from_cnt as integer no-undo.
assign Email_from = Email_from + 'vantage@...'.

define variable Email_to_cnt as integer no-undo.
assign Email_to = Email_to + 'me@...'.

define variable Email_cc_cnt as integer no-undo.

define variable Email_subject_cnt as integer no-undo.
assign Email_subject = Email_subject + 'Test'.

define variable Email_body_cnt as integer no-undo.
assign Email_body = Email_body + 'This is yet another test.'.

run SendEmail in Email_hEmailProc (
true,
CUR-COMP,
Email_from,
Email_to,
Email_cc,
Email_subject,
Email_body,
"":U
).
if valid-handle(Email_hEmailProc) then delete procedure Email_hEmailProc.
leave.


I haven't tried, but you should be able to "find" fields in non-related tables and include them in Email_body.


HTH,

Nigel.


--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> Anyone using 4GL Action to send custom email message (because wizard is so limited)?
>
> If so, do you have any luck getting the message to send asynchronously?
>
> If I set the Async parameter to true, the message never seems to get sent and when I use false, the user has to wait while the message sends....
>
> run SendEmail in EMhEmailProc (
> false,
> CUR-COMP,
> EMfrom,
> EMto,
> EMcc,
> EMsubject,
> EMbody,
> "":U
> ).
>
So you can send custom e-mail messages from BPM 4GL actions?!?!

Where's the docs on that?

-bws

--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of bw2868bond
Sent: Thursday, July 23, 2009 2:35 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Vantage 8.03.405a BPM Custom Email Message

Anyone using 4GL Action to send custom email message (because wizard is so limited)?

If so, do you have any luck getting the message to send asynchronously?

If I set the Async parameter to true, the message never seems to get sent and when I use false, the user has to wait while the message sends....

run SendEmail in EMhEmailProc (
false,
CUR-COMP,
EMfrom,
EMto,
EMcc,
EMsubject,
EMbody,
"":U
).



------------------------------------

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