Email and Attachments

Home Forums Classic DFFS Email and Attachments

Viewing 4 reply threads
  • Author
    Posts
    • #30156
      William Summers
      Participant

        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!

      • #30170
        Alexander Bautz
        Keymaster

          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

        • #32200
          MikeS
          Participant

            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

          • #32212
            Alexander Bautz
            Keymaster

              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

            • #32216
              MikeS
              Participant

                Works great Alex.

                Thanks for your help,
                MikeS

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.