Email the contents of a record
Hoping I can get some direction.
I'd like to Print the contenct of record to a PDF and email it to the email address in the record.
I have the Print form created. Now I need the script that will send the record data to the print form and email it.
Thanks.
3 replies
-
Just about got it figured out. First I print the record to an attachement. Then I Send the email. I'm missing some simple part of the code.
importFile(this, printAndSaveRecord(this, "Weddings"), 'Bride, Last Name' + ".pdf")
sendEmail({
from: "my email.com",
to: 'Email (Bride)',
subject: "Hello World!",
text: "Some text",
attachments: file(this, 'Bride, Last Name' + ".pdf")
})
Getting an End Expected error. See attached.
-
I think you are missing ; at the end of the first line.
importFile(this, printAndSaveRecord(this, "Weddings"), 'Bride, Last Name' + ".pdf");
-
Bingo. Thanks.
Content aside
- 5 yrs agoLast active
- 3Replies
- 1637Views