Creating a Record from a Button Sending an Email
Hi,
I've set up buttons to send emails, but I need to keep a record of the emails sent. How can I get this same button to create a record in a new table for storing these emails?
3 replies
-
if you use variables in your sendEmail() function, you can reuse them to create a record. e.g.
let sender:= userEmail();
let receiver := ClientEmail;
let subj := Subject;
let txt := Textfield;
let body := raw(RTF-Field);
sendEmail({
from: sender,
to: receiver,
subject: subj,
text: txt
html: body,
});
let i := create Emailbackuptable;
i.(DateandTimefield := now();
Subject := subj;
Text := txt;
SendBy := sender;
Receiver := receiver;
message := body)
You can add more fields if you need to but you get the idea....
This thread is an example....(and even more than you need)
Content aside
- 1 yr agoLast active
- 3Replies
- 160Views
-
2
Following