Vantage 6.1 BAM

I noticed that as soon as I sent the email. I am re-writing it to look at the PORel table instead of the
PODetail. thanks

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Stephen Edginton
Sent: Tuesday, September 02, 2008 8:04 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Vantage 6.1 BAM


The code that checks looks at the podetail.checkbox02 but you mention
the POREL table?

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
Of PLAMAN DICK
Sent: 02 September 2008 12:59
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Vantage 6.1 BAM

Can anyone see a problem with this code to fire an email when a VB
Checkbox is checked?
This code will not initiate an email if the checkbox in the VBform
(POREL table) is checked.

{ud/GlbAlert.i &TableName = "PORel"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

FIND poheader WHERE poheader.company = porel.company AND
poheader.ponum = porel.ponum NO-LOCK.
FIND podetail WHERE podetail.company = porel.company AND
podetail.ponum = porel.ponum AND
podetail.poline = porel.poline NO-LOCK.
FIND vendor WHERE vendor.company = podetail.company AND
vendor.vendornum = podetail.vendornum NO-LOCK.
IF podetail.checkbox02 = YES
THEN DO:
ASSIGN Email-Subject = "PO DATE has Changed".
email-Text = "PO Number: " + STRING(PORel.PONum) + "~n"
+ "PO Line: " + STRING(POrel.POLine) + "~n"
+ "PO Rel: " + STRING(PORel.PORel) + "~n"
+ "PartNum: " + STRING(PODetail.PartNum) + "~n"
+ "Vendor: " + string(vendor.NAME) + "~n"
+ "OrigDate:" + STRING(PODetail.Date01) + "~n"
+ "Reason: " + STRING(PODetail.Character01) + "~n"
+ "New Date:" + STRING(PORel.DueDate).
END.
ELSE DO:
RETURN "Cancel Send":U.
END.

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

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





[Non-text portions of this message have been removed]
Can anyone see a problem with this code to fire an email when a VB Checkbox is checked?
This code will not initiate an email if the checkbox in the VBform (POREL table) is checked.

{ud/GlbAlert.i &TableName = "PORel"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.


FIND poheader WHERE poheader.company = porel.company AND
poheader.ponum = porel.ponum NO-LOCK.
FIND podetail WHERE podetail.company = porel.company AND
podetail.ponum = porel.ponum AND
podetail.poline = porel.poline NO-LOCK.
FIND vendor WHERE vendor.company = podetail.company AND
vendor.vendornum = podetail.vendornum NO-LOCK.
IF podetail.checkbox02 = YES
THEN DO:
ASSIGN Email-Subject = "PO DATE has Changed".
email-Text = "PO Number: " + STRING(PORel.PONum) + "~n"
+ "PO Line: " + STRING(POrel.POLine) + "~n"
+ "PO Rel: " + STRING(PORel.PORel) + "~n"
+ "PartNum: " + STRING(PODetail.PartNum) + "~n"
+ "Vendor: " + string(vendor.NAME) + "~n"
+ "OrigDate:" + STRING(PODetail.Date01) + "~n"
+ "Reason: " + STRING(PODetail.Character01) + "~n"
+ "New Date:" + STRING(PORel.DueDate).
END.
ELSE DO:
RETURN "Cancel Send":U.
END.


[Non-text portions of this message have been removed]
The code that checks looks at the podetail.checkbox02 but you mention
the POREL table?





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of PLAMAN DICK
Sent: 02 September 2008 12:59
To: vantage@yahoogroups.com
Subject: [Vantage] Vantage 6.1 BAM



Can anyone see a problem with this code to fire an email when a VB
Checkbox is checked?
This code will not initiate an email if the checkbox in the VBform
(POREL table) is checked.

{ud/GlbAlert.i &TableName = "PORel"}
DEFINE VARIABLE NewEmailBody AS CHARACTER NO-UNDO.

FIND poheader WHERE poheader.company = porel.company AND
poheader.ponum = porel.ponum NO-LOCK.
FIND podetail WHERE podetail.company = porel.company AND
podetail.ponum = porel.ponum AND
podetail.poline = porel.poline NO-LOCK.
FIND vendor WHERE vendor.company = podetail.company AND
vendor.vendornum = podetail.vendornum NO-LOCK.
IF podetail.checkbox02 = YES
THEN DO:
ASSIGN Email-Subject = "PO DATE has Changed".
email-Text = "PO Number: " + STRING(PORel.PONum) + "~n"
+ "PO Line: " + STRING(POrel.POLine) + "~n"
+ "PO Rel: " + STRING(PORel.PORel) + "~n"
+ "PartNum: " + STRING(PODetail.PartNum) + "~n"
+ "Vendor: " + string(vendor.NAME) + "~n"
+ "OrigDate:" + STRING(PODetail.Date01) + "~n"
+ "Reason: " + STRING(PODetail.Character01) + "~n"
+ "New Date:" + STRING(PORel.DueDate).
END.
ELSE DO:
RETURN "Cancel Send":U.
END.

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





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