V8.x - BAM e-mail Alert

This is how the Progress code looks in version 6.x. It sends an e-
mail to the selected salesperson. Obviously, you need different
tables and fields but you can see how to use a CASE statement to pick
the correct person. You can also see where the text is assigned.
Send me an e-mail off-line if you would like some help customizing
this to your situation. Everything here is copied from this group or
the Midwest Users Group and I do not believe there are any
restrictions on its reuse.

/***********
include Global Alert file - Customer table was selected in BAM
*************/
{ud/GlbAlert.i &TableName = "Customer"}

/**************
test to see if the new customer record was completed.
**************/
IF Customer.Name = "" THEN DO:
RETURN "Cancel Send":U.
END.


IF Customer.CreditHold THEN DO:
ASSIGN Email-Subject = "Customer Placed on Credit Hold".
END.
ELSE DO:
ASSIGN Email-Subject = "Customer Taken off Credit Hold".
END.


ASSIGN Email-From = "controller@...".


CASE Customer.SalesRepCode:
WHEN "RICKB" THEN
ASSIGN Email-To = "salesperson1@...".
WHEN "DKR" THEN
ASSIGN Email-To = "salesperson2@...".
WHEN "KJ" THEN
ASSIGN Email-To = "salesperson3@...".
OTHERWISE
ASSIGN Email-To = "salesmanager@...".
END CASE.

ASSIGN Email-To = Email-To + "; orderentry@...".
ASSIGN Email-To = Email-To + "; ar@...".
ASSIGN Email-To = Email-To + "; controller@...".

IF Customer.CreditHold THEN DO:
ASSIGN Email-Text = Customer.Name + " has been placed on credit
hold".
END.
ELSE DO:
ASSIGN Email-Text = Customer.Name + " has been taken off credit
hold".
END.




--- In vantage@yahoogroups.com, "Todd Hofert" <todd@...> wrote:
>
> I am starting to explore BAM in V8.03. Our Job Planners would like
to be
> notified via e-mail when a PO attached to their job reaches 2 days
prior
> to the due date without a receipt and they would like an e-mail
> notifying them when a PO Line attached to their job has been
received
> complete. I nosed around a bit in BAM and was able to get an e-mail
to
> fire to a specific person when the receive complete checkbox is
checked
> at receipt entry. I got stuck when trying to figure out:
>
>
>
> * How to send the alert to the specific Planner of a job
>
> * How to include Vantage fields such as Job Number, PO
Number,
> Part Number etc into the body of the e-mail?
>
>
>
> Can this be done? If so, can anyone lead me down the right path?
>
>
>
> Thanks
>
> Todd
>
>
>
> This e-mail and any attachments may contain confidential and
privileged
> information. If you are not the intended recipient, please notify
the
> sender immediately by return e-mail, delete this e-mail and destroy
any
> copies. Any dissemination or use of this information by a person
other
> than the intended recipient is unauthorized and may be illegal.
>
> [Non-text portions of this message have been removed]
>
I am starting to explore BAM in V8.03. Our Job Planners would like to be
notified via e-mail when a PO attached to their job reaches 2 days prior
to the due date without a receipt and they would like an e-mail
notifying them when a PO Line attached to their job has been received
complete. I nosed around a bit in BAM and was able to get an e-mail to
fire to a specific person when the receive complete checkbox is checked
at receipt entry. I got stuck when trying to figure out:



* How to send the alert to the specific Planner of a job

* How to include Vantage fields such as Job Number, PO Number,
Part Number etc into the body of the e-mail?



Can this be done? If so, can anyone lead me down the right path?



Thanks

Todd



This e-mail and any attachments may contain confidential and privileged
information. If you are not the intended recipient, please notify the
sender immediately by return e-mail, delete this e-mail and destroy any
copies. Any dissemination or use of this information by a person other
than the intended recipient is unauthorized and may be illegal.

[Non-text portions of this message have been removed]
Hi Todd,

I haven't been very successful with BAM but...

> * How to send the alert to the specific Planner of a job

Anytime I have a program that emails reports or alerts, I ALWAYS create an
email alias in my email server and never use actual email addresses. It's so
much easier to change a member in an email distribution list than it is to
change the code in a program. So I would recommend creating email distribution
lists for each planner code and then putting the main contact and possibly a
backup person in that group (to handle sick days and vacations).

Food for thought,

Mark W.