Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
3 years ago

Creating a new outlook email, and including a link to a file attachment field

I've found a lot of threads on creating a new outlook email, but not sure if I have seen this exact question asked (or if so, I got lost in the rabbit hole of threads).

When using the "mailto:" command in a formula field, I found ways to set the subject line, the to: field, and include a message in the body of the email.

Is there a way to include a link to a file attachment field? I realize the field would need to be set to open access.

I don't want to use a notification, because in this use case the sender really needs a lot of flexibility to edit the body of the email, add people to CC in certain scenarios, etc.

I may go the notification route, but checking my options....

------------------------------
Mike Tamoush
------------------------------

12 Replies

  • You can include a URL formula field in the body

    URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e99/v0"

    Where 99 gets replaced with the fid of the file attachment field.

    I believe that the email clients like gmail and Outlook at the recipient end will see the link and make it a hyperlink. 
     


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      Thanks Mark I'll give it a try. Right now I can't get my email code to produce the subject or body. Can you tell what my mistake is?

      var text Subject = "This is the Subject";

      var text Body = "This is the body";

      //var text Email = "mailto:" & "" & "mtamoush@gmail.com" & "\n" & "?subject=" & $subject & " &body=" & $Body &"";
      var text Email = "mailto:"&""&"mtamoush@gmail.com"&"\n"&"?subject="&"\n"&URLEncode($Subject) &""&"&body="&URLEncode($Body)&"";


      "<a href=" & $Email & ">" & "Send Email Test" & "</a>"

      ------------------------------
      Mike Tamoush
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        You are building a URL need to travel through the vagaries of the Internet. That means that you need to use URLEncode for any characters which are not A-Z or 0-9 and that means that \n is illegal.  

        var text Email = "mailto:mtamoush@gmail.com"
        & "?subject=" & URLEncode($Subject)
        & "&body=" &URLEncode($Body);


        "<a href=" & $Email & ">" & "Send Email Test" & "</a>"



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------