Business Activity Alert syntax problem - Help

In addition to the comments below, we also discovered you can send
the email to multiple addresses by seperating with a comma. You
used the format "user1@..., user2@..."

Just thought we would post it as "historical" data.

Aaron Hoyt
Hittite Microwave

--- In vantage@yahoogroups.com, aaronhoyt@v... wrote:
> John and others interested,
>
> Cliff and I took the original thread offline. These is the
results
> that I have managed to make work in our testing environment. I
> thought others might find it of use, so I decided to publish the
> results. Forgive the length of the message please.
>
> (for auto email upon the creation of an order for a "credit hold"
> customer)
>
> CreditHO.p
> ----------
> {ud/GlbAlert.i &tablename = "OrderHed" }
>
> DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
>
> /*new email body*/
> IF OrderHed.OpenOrder = TRUE
>
> THEN DO:
>
> FIND Customer WHERE (Customer.Company = OrderHed.Company) AND
> (Customer.Custnum = OrderHed.Custnum)
> NO-LOCK.
> IF Customer.CreditHold = TRUE
> THEN DO:
> ASSIGN Email-To = "hoyt@h..."
> Email-Subject = "Credit Hold Order"
> Email-Text = "Sales order "
> + string(OrderHed.Ordernum)
> + " has been created for "
> + string(Customer.name)
> + " and they are on credit hold.".
>
> END.
> ELSE DO:
> Return "Cancel Send":U.
> END.
> END.
> ELSE DO:
> Return "Cancel Send":U.
> END.
> ----------
>
> (for automatic email on the use of the override function from the
AR
> module for a specific order)
>
> CreditOR.P
> ----------
> {ud/GlbAlert.i &tablename = "OrderHed" }
>
> DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
>
> /*new email body*/
> IF OrderHed.CreditOverride = TRUE
>
> THEN DO:
>
> FIND Customer WHERE (Customer.Company = OrderHed.Company) AND
> (Customer.Custnum = OrderHed.Custnum)
> NO-LOCK.
>
> ASSIGN Email-To = "hoyt@h..."
> Email-Subject = "Credit Override"
> Email-Text = "Sales order "
> + string(OrderHed.Ordernum)
> + " has been created for "
> + string(Customer.name)
> + " and they are on credit hold.".
>
> END.
> ELSE DO:
> Return "Cancel Send":U.
> END.
> ----------
>
> If anyone uses either of these codes, please remove my address
from
> the "Email-To" field. I don't mind it being used by those with
> questions, but I really don't want to know every time you create
> orders for credit hold customers.
> Feel free to customize this code for your purpose. As for the
> GlbAlert.i include program, please call your Epicor rep and ask
for
> a copy.
>
> Good luck to all.
>
> Aaron Hoyt
> Hittite Microwave Corporation
Our system (Vantage 6 .515) is set up to Warn when Credit Hold is
overridden. I need to set up a Business Activity Manager Alert to tell the
CFO when this is done. I set the alert up on OrderHed.Creditoverride field.
This will send an alert for every order created as the logical meets both
true and false. My aim is to only send an email when it is true.
I wrote the following in an attempt achieve this.

{ud/GlbAlert.i &tablename = "orderhed" }

DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.

/*new email body*/
IF orderhed.creditoverride = TRUE
THEN DO:
ASSIGN Email-Subject = "Credit Override"
ASSIGN Email-Text = "Sales order created for customer on credit hold.".
END
ELSE DO:
Return Error.
END.

This returns the following error codes when creating a sales order
and then shuts down Vantage.
<<...OLE_Obj...>>
<<...OLE_Obj...>>
line 9 is the ELSE DO:
LINE 10 IS Return error.

Where have I gone wrong with the logic or syntax ?? Any help would
be greatly appreciated.



Cliff Drumeller
IT Manager
Mass Precision Sheetmetal
408 954 0200
> Our system (Vantage 6 .515) is set up to Warn when Credit Hold is
> overridden. I need to set up a Business Activity Manager Alert to tell the
> CFO when this is done. I set the alert up on OrderHed.Creditoverride
> field. This will send an alert for every order created as the logical
> meets both true and false. My aim is to only send an email when it is
> true.
> I wrote the following in an attempt achieve this.
>
> {ud/GlbAlert.i &tablename = "orderhed" }
>
> DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
>
> /*new email body*/
> IF orderhed.creditoverride = TRUE
> THEN DO:
> ASSIGN Email-Subject = "Credit Override"
> ASSIGN Email-Text = "Sales order created for customer on credit hold.".
> END
> ELSE DO:
> Return Error.
> END.
>
> This returns the following error codes when creating a sales order
> and then shuts down Vantage.
>
> Credit override.p Could not understand line 9. (198) line 9 is the
> ELSE DO:
>
> Credit override.p Line 10. Colon followed by white spaces terminates a
> statement LINE 10 IS Return error.
>
>
> Where have I gone wrong with the logic or syntax ?? Any help would
> be greatly appreciated.
>
>
>
> Cliff Drumeller
> IT Manager
> Mass Precision Sheetmetal
> 408 954 0200
>
Cliff,

If this is the actual text of the proram, you might want to look at
adding a . after the end statement before the ELSE DO:. I don't
know if that is the problem or not, but I think it might have been
overlooked.

Good luck,

Aaron Hoyt
Hittite Microwave Corporation

--- In vantage@yahoogroups.com, Cliff Drumeller <cliff@m...> wrote:
>
>
> Our system (Vantage 6 .515) is set up to Warn when Credit
Hold is
> overridden. I need to set up a Business Activity Manager Alert to
tell the
> CFO when this is done. I set the alert up on
OrderHed.Creditoverride field.
> This will send an alert for every order created as the logical
meets both
> true and false. My aim is to only send an email when it is true.
> I wrote the following in an attempt achieve this.
>
> {ud/GlbAlert.i &tablename = "orderhed" }
>
> DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
>
> /*new email body*/
> IF orderhed.creditoverride = TRUE
> THEN DO:
> ASSIGN Email-Subject = "Credit Override"
> ASSIGN Email-Text = "Sales order created for customer on credit
hold.".
> END
> ELSE DO:
> Return Error.
> END.
>
> This returns the following error codes when creating a sales
order
> and then shuts down Vantage.
> <<...OLE_Obj...>>
> <<...OLE_Obj...>>
> line 9 is the ELSE DO:
> LINE 10 IS Return error.
>
> Where have I gone wrong with the logic or syntax ?? Any help
would
> be greatly appreciated.
>
>
>
> Cliff Drumeller
> IT Manager
> Mass Precision Sheetmetal
> 408 954 0200
Cliff,

You also might want to add something other than a return error,
like...
RETURN "CANCEL SEND":U.

That should eliminate the email if your field is not True.

Hope this helps,
Aaron Hoyt
Hittite Microwave Corporation

--- In vantage@yahoogroups.com, "aaronhoytwork" <aaronhoyt@v...>
wrote:
> Cliff,
>
> If this is the actual text of the proram, you might want to look
at
> adding a . after the end statement before the ELSE DO:. I don't
> know if that is the problem or not, but I think it might have been
> overlooked.
>
> Good luck,
>
> Aaron Hoyt
> Hittite Microwave Corporation
>
> --- In vantage@yahoogroups.com, Cliff Drumeller <cliff@m...> wrote:
> >
> >
> > Our system (Vantage 6 .515) is set up to Warn when Credit
> Hold is
> > overridden. I need to set up a Business Activity Manager Alert
to
> tell the
> > CFO when this is done. I set the alert up on
> OrderHed.Creditoverride field.
> > This will send an alert for every order created as the logical
> meets both
> > true and false. My aim is to only send an email when it is true.
> > I wrote the following in an attempt achieve this.
> >
> > {ud/GlbAlert.i &tablename = "orderhed" }
> >
> > DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
> >
> > /*new email body*/
> > IF orderhed.creditoverride = TRUE
> > THEN DO:
> > ASSIGN Email-Subject = "Credit Override"
> > ASSIGN Email-Text = "Sales order created for customer on credit
> hold.".
> > END
> > ELSE DO:
> > Return Error.
> > END.
> >
> > This returns the following error codes when creating a sales
> order
> > and then shuts down Vantage.
> > <<...OLE_Obj...>>
> > <<...OLE_Obj...>>
> > line 9 is the ELSE DO:
> > LINE 10 IS Return error.
> >
> > Where have I gone wrong with the logic or syntax ?? Any help
> would
> > be greatly appreciated.
> >
> >
> >
> > Cliff Drumeller
> > IT Manager
> > Mass Precision Sheetmetal
> > 408 954 0200
Aaron,



I would like to be able to use Global Alerts like Cliff.

I don't have Provision. Can I use a text editor to make

Conditional statements so the emails that go out have

A little more intelligence to them. Is Cliff's example a good one to
use? Do you have an example that could

Be used as a template?



Thanks,



John Mansfield

General Sheet Metal



-----Original Message-----
From: aaronhoytwork [mailto:aaronhoyt@...]
Sent: Monday, December 15, 2003 3:59 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Business Activity Alert syntax problem - Help



Cliff,

You also might want to add something other than a return error,
like...
RETURN "CANCEL SEND":U.

That should eliminate the email if your field is not True.

Hope this helps,
Aaron Hoyt
Hittite Microwave Corporation

--- In vantage@yahoogroups.com, "aaronhoytwork" <aaronhoyt@v...>
wrote:
> Cliff,
>
> If this is the actual text of the proram, you might want to look
at
> adding a . after the end statement before the ELSE DO:. I don't
> know if that is the problem or not, but I think it might have been
> overlooked.
>
> Good luck,
>
> Aaron Hoyt
> Hittite Microwave Corporation
>
> --- In vantage@yahoogroups.com, Cliff Drumeller <cliff@m...> wrote:
> >
> >
> > Our system (Vantage 6 .515) is set up to Warn when Credit
> Hold is
> > overridden. I need to set up a Business Activity Manager Alert
to
> tell the
> > CFO when this is done. I set the alert up on
> OrderHed.Creditoverride field.
> > This will send an alert for every order created as the logical
> meets both
> > true and false. My aim is to only send an email when it is true.
> > I wrote the following in an attempt achieve this.
> >
> > {ud/GlbAlert.i &tablename = "orderhed" }
> >
> > DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
> >
> > /*new email body*/
> > IF orderhed.creditoverride = TRUE
> > THEN DO:
> > ASSIGN Email-Subject = "Credit Override"
> > ASSIGN Email-Text = "Sales order created for customer on credit
> hold.".
> > END
> > ELSE DO:
> > Return Error.
> > END.
> >
> > This returns the following error codes when creating a sales
> order
> > and then shuts down Vantage.
> > <<...OLE_Obj...>>
> > <<...OLE_Obj...>>
> > line 9 is the ELSE DO:
> > LINE 10 IS Return error.
> >
> > Where have I gone wrong with the logic or syntax ?? Any help
> would
> > be greatly appreciated.
> >
> >
> >
> > Cliff Drumeller
> > IT Manager
> > Mass Precision Sheetmetal
> > 408 954 0200






Yahoo! Groups Sponsor



ADVERTISEMENT

<http://rd.yahoo.com/SIG=12cnkinbp/M=267637.4116730.5333196.1261774/D=eg
roupweb/S=1705007183:HM/EXP=1071608352/A=1853618/R=0/*http:/www.netflix.
com/Default?mqso=60178338&partid=4116730> click here



<http://us.adserver.yahoo.com/l?M=267637.4116730.5333196.1261774/D=egrou
pmail/S=:HM/A=1853618/rand=731959221>


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/.
<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/links

Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.



[Non-text portions of this message have been removed]
John,
I am betting there are more qualified people on this list to answer
this question, but I will give a shot.
1. There is no need for Provision. I don't have it either. You
can either use the Procedure Editor built into Progess, or your
favorite Plain text editor to write a sample .P file.
2. From the syntax Cliff used, I assume he is learning from the
same source that I am. Epicor Rep (Jeff for me) sent me a sample to
use to build into an automated Email Notification System for our
customers (shipping notification). I am still working on formatting
that, but the source is very similar. If Cliff did not use this
source, I apologize Cliff.
3. This can balloon into a ton of projects. As you discover what
you can do with .vbp, .P, .I, and .W files with just a text editor,
you will find a new horizon. Especially when combined with the new
freedom Vantage has in 6.0 with its "Customization". The
possibilities are endless.
You do have some programming to learn, but so far I have done little
reading and bunches of code modification. Good place to start
reading is in Help files from the respective tools (VBForms),
(Procedure Editor) etc.
Good luck.

Aaron Hoyt
Hittite Microwave Corporation


--- In vantage@yahoogroups.com, "John Mansfield" <johnm@g...> wrote:
> Aaron,
>
>
>
> I would like to be able to use Global Alerts like Cliff.
>
> I don't have Provision. Can I use a text editor to make
>
> Conditional statements so the emails that go out have
>
> A little more intelligence to them. Is Cliff's example a good one
to
> use? Do you have an example that could
>
> Be used as a template?
>
>
>
> Thanks,
>
>
>
> John Mansfield
>
> General Sheet Metal
>
>
>
> -----Original Message-----
> From: aaronhoytwork [mailto:aaronhoyt@v...]
> Sent: Monday, December 15, 2003 3:59 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Business Activity Alert syntax problem -
Help
>
>
>
> Cliff,
>
> You also might want to add something other than a return error,
> like...
> RETURN "CANCEL SEND":U.
>
> That should eliminate the email if your field is not True.
>
> Hope this helps,
> Aaron Hoyt
> Hittite Microwave Corporation
>
> --- In vantage@yahoogroups.com, "aaronhoytwork" <aaronhoyt@v...>
> wrote:
> > Cliff,
> >
> > If this is the actual text of the proram, you might want to look
> at
> > adding a . after the end statement before the ELSE DO:. I don't
> > know if that is the problem or not, but I think it might have
been
> > overlooked.
> >
> > Good luck,
> >
> > Aaron Hoyt
> > Hittite Microwave Corporation
> >
> > --- In vantage@yahoogroups.com, Cliff Drumeller <cliff@m...>
wrote:
> > >
> > >
> > > Our system (Vantage 6 .515) is set up to Warn when
Credit
> > Hold is
> > > overridden. I need to set up a Business Activity Manager Alert
> to
> > tell the
> > > CFO when this is done. I set the alert up on
> > OrderHed.Creditoverride field.
> > > This will send an alert for every order created as the logical
> > meets both
> > > true and false. My aim is to only send an email when it is
true.
> > > I wrote the following in an attempt achieve this.
> > >
> > > {ud/GlbAlert.i &tablename = "orderhed" }
> > >
> > > DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.
> > >
> > > /*new email body*/
> > > IF orderhed.creditoverride = TRUE
> > > THEN DO:
> > > ASSIGN Email-Subject = "Credit Override"
> > > ASSIGN Email-Text = "Sales order created for customer on
credit
> > hold.".
> > > END
> > > ELSE DO:
> > > Return Error.
> > > END.
> > >
> > > This returns the following error codes when creating a
sales
> > order
> > > and then shuts down Vantage.
> > > <<...OLE_Obj...>>
> > > <<...OLE_Obj...>>
> > > line 9 is the ELSE DO:
> > > LINE 10 IS Return error.
> > >
> > > Where have I gone wrong with the logic or syntax ?? Any
help
> > would
> > > be greatly appreciated.
> > >
> > >
> > >
> > > Cliff Drumeller
> > > IT Manager
> > > Mass Precision Sheetmetal
> > > 408 954 0200
John and others interested,

Cliff and I took the original thread offline. These is the results
that I have managed to make work in our testing environment. I
thought others might find it of use, so I decided to publish the
results. Forgive the length of the message please.

(for auto email upon the creation of an order for a "credit hold"
customer)

CreditHO.p
----------
{ud/GlbAlert.i &tablename = "OrderHed" }

DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.

/*new email body*/
IF OrderHed.OpenOrder = TRUE

THEN DO:

FIND Customer WHERE (Customer.Company = OrderHed.Company) AND
(Customer.Custnum = OrderHed.Custnum)
NO-LOCK.
IF Customer.CreditHold = TRUE
THEN DO:
ASSIGN Email-To = "hoyt@..."
Email-Subject = "Credit Hold Order"
Email-Text = "Sales order "
+ string(OrderHed.Ordernum)
+ " has been created for "
+ string(Customer.name)
+ " and they are on credit hold.".

END.
ELSE DO:
Return "Cancel Send":U.
END.
END.
ELSE DO:
Return "Cancel Send":U.
END.
----------

(for automatic email on the use of the override function from the AR
module for a specific order)

CreditOR.P
----------
{ud/GlbAlert.i &tablename = "OrderHed" }

DEFINE VARIABLE NewEmailBofy AS CHARACTER NO-UNDO.

/*new email body*/
IF OrderHed.CreditOverride = TRUE

THEN DO:

FIND Customer WHERE (Customer.Company = OrderHed.Company) AND
(Customer.Custnum = OrderHed.Custnum)
NO-LOCK.

ASSIGN Email-To = "hoyt@..."
Email-Subject = "Credit Override"
Email-Text = "Sales order "
+ string(OrderHed.Ordernum)
+ " has been created for "
+ string(Customer.name)
+ " and they are on credit hold.".

END.
ELSE DO:
Return "Cancel Send":U.
END.
----------

If anyone uses either of these codes, please remove my address from
the "Email-To" field. I don't mind it being used by those with
questions, but I really don't want to know every time you create
orders for credit hold customers.
Feel free to customize this code for your purpose. As for the
GlbAlert.i include program, please call your Epicor rep and ask for
a copy.

Good luck to all.

Aaron Hoyt
Hittite Microwave Corporation