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