Hi,
Been playing around with this but have been unable to come up with a solution.
I have a Grid that as part of the "AfterUpdateRecord" Server-side events includes some code to send an email.
I would like to inlcude in this a table showing the filtered grid or the results fo an SQL recordset but have been unable to find a way, any help would be much appreciated.
The code I'm currently using is along the lines of
'Send an e- mail message using the Alpha Five e-mail clilent.
Dim message_type as c
Dim Func_Area as c
Dim Hold_Reason as c
Func_Area = e.dataSubmitted.Functional_Area
Hold_Reason = e.dataSubmitted.Reason
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
message_type = "HTML"
param_to = "[email protected]"
param_subject = e.dataSubmitted.OrderNumber
param_cc = ""
param_bcc = ""
html_msg = <<%html%
<html>
<head> </head>
<body>
<p> This is an automated email from the Alpha Five </p>
<p> Blah blah blah </p>
<p> <b>Functional Area:</b> {Func_Area}</p>
<p> <b>Hold Reason:</b> {Hold_Reason}</p>
<p>This is where I'd like to include the table of either my filtered grid or a recordset I've populated</p>
</body>
</html>
%html%
param_message = evaluate_string(html_msg)
attachment_list = ""
param_attachments = alltrim(attachment_list)
'Send the e-mail message directly - do not open the Alpha Five e-mail client
send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc,.t.,message_type)
if send_result = 1 then
ui_msg_box("Notice","E-mail message sent.",UI_INFORMATION_SYMBOL)
else
ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
end if
Many thanks for all help!
Dave
Been playing around with this but have been unable to come up with a solution.
I have a Grid that as part of the "AfterUpdateRecord" Server-side events includes some code to send an email.
I would like to inlcude in this a table showing the filtered grid or the results fo an SQL recordset but have been unable to find a way, any help would be much appreciated.
The code I'm currently using is along the lines of
'Send an e- mail message using the Alpha Five e-mail clilent.
Dim message_type as c
Dim Func_Area as c
Dim Hold_Reason as c
Func_Area = e.dataSubmitted.Functional_Area
Hold_Reason = e.dataSubmitted.Reason
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
message_type = "HTML"
param_to = "[email protected]"
param_subject = e.dataSubmitted.OrderNumber
param_cc = ""
param_bcc = ""
html_msg = <<%html%
<html>
<head> </head>
<body>
<p> This is an automated email from the Alpha Five </p>
<p> Blah blah blah </p>
<p> <b>Functional Area:</b> {Func_Area}</p>
<p> <b>Hold Reason:</b> {Hold_Reason}</p>
<p>This is where I'd like to include the table of either my filtered grid or a recordset I've populated</p>
</body>
</html>
%html%
param_message = evaluate_string(html_msg)
attachment_list = ""
param_attachments = alltrim(attachment_list)
'Send the e-mail message directly - do not open the Alpha Five e-mail client
send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc,.t.,message_type)
if send_result = 1 then
ui_msg_box("Notice","E-mail message sent.",UI_INFORMATION_SYMBOL)
else
ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
end if
Many thanks for all help!
Dave