Email and Attachments
- This topic has 4 replies, 3 voices, and was last updated 5 years, 11 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Email and Attachments
Good day to you sir.
Is it possible to use the email and print option that would send an email with a direct link to the attachment in a record? I don’t want to physically attach them item, just give the end user the ability to click a link in the received email that would go directly to that records attachments.
Thanks!
The emails are sent when the form is saved so if you put this in your Custom JS:
// Define the variable so it is accessible to the email
var attLink = "";
function dffs_PreSaveAction() {
// Get the attachments
attLink = getFieldValue("Attachments").join("<br>");
return true;
}
Then you use this in your email body:
{var:attLink}
Please note that if you already have a function named dffs_PreSaveAction in your Custom JS you must merge then into one.
Alexander
Alex,
I have a lookup column in List A that links to an item in List B. I wish to include the link to the List B item in a DFFS email generated from the Display form in List A. The {viewitemlink} does not work as it goes to List A. I tried a variation of the script above in my List A Display form Custom JS but that did not work either.
Thanks for your help,
MikeS
Hi,
You can add this to your custom js:
var lookupLink = jQuery("#dffs_Your_Lookup_Column a:last").attr("href");
Replace Your_Lookup_Column with your FieldInternalName and use the variable in your email likethis:
{var:lookupLink}
Alexander
Works great Alex.
Thanks for your help,
MikeS