Just the same way that you have already set the subject.
For Example:
Email-Text = "A Quantity of " + string(orderdtl.orderqty) +
" for Part Number " + STRING(orderdtl.partnum) + " has
been added to SO " + string(orderdtl.ordernum) + " as Line Number " +
string(orderdtl.orderline) + " for despatch on " + string
(orderdtl.needbydate) + ". " + string(orderdtl.ordercomment) + ".".
You need an Assign command beforehand, but can set the addresses,
subject and text all from one assign command.
General rules: "Text within quotation marks."
space before and after the + which concatentates a database field and
all the database fields in the same format (I've converted all above
to strings (even when I didn't need to probably)).
I'm sure there's more but I'm just learning too.
Ruth Joy
For Example:
Email-Text = "A Quantity of " + string(orderdtl.orderqty) +
" for Part Number " + STRING(orderdtl.partnum) + " has
been added to SO " + string(orderdtl.ordernum) + " as Line Number " +
string(orderdtl.orderline) + " for despatch on " + string
(orderdtl.needbydate) + ". " + string(orderdtl.ordercomment) + ".".
You need an Assign command beforehand, but can set the addresses,
subject and text all from one assign command.
General rules: "Text within quotation marks."
space before and after the + which concatentates a database field and
all the database fields in the same format (I've converted all above
to strings (even when I didn't need to probably)).
I'm sure there's more but I'm just learning too.
Ruth Joy
--- In vantage@yahoogroups.com, "how2wow" <mhow@...> wrote:
>
> Like many of you, I too am a newer Vantage user... went live on
> version 8 this past September. We didn't realize that alot of the
> neat alerts we were sold on had to be written by us! So, we are
> learning... mostly by trial and error.
>
> Since there seem to be some seasoned veterans out there... was
> wondering if someone could give an example of how to take this very
> simple alert and add information. This alert simply sends an e-
> when a new part is added- the part number is in the subject line.
> How would it be modified to include vital information in the body
of
> the e-mail? For example, including the part description and
product
> code.
>
> I think once we get the hang of this, it won't be so bad. Just
> looking for some examples.
>
> {ud/GlbAlert.i &TableName = "Part"}
>
> /* Set the FROM address */
> ASSIGN Email-From = "vantage@...;Part Change
> Notification":U.
>
> /* Add the part number to the subject line */
> ASSIGN Email-Subject = Email-Subject + " (" + Part.PartNum + ")".
>
> /* Set the email type to be HTML */
> ASSIGN Email-Mime-Header = {&HTML-Mime}.
>