Forum Discussion

ChrisMolkenbuhr's avatar
ChrisMolkenbuhr
Qrew Trainee
5 years ago

URL Button to check a checkbox and initiate outlook for email

Hi,
I'm trying to create a button that will check a checkbox and then open outlook and populate the recipients, subject line and body. I copied one of kirks buttons to check the checkbox and have made buttons to initiate outlook before, but cant seem to get them to do both in one button. Below is my formula:

var text url =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken= apptoken " &
"&_fid_415=1";

"mailto:"&""&[Recipient 1]&";"&[Recipient 2]&"\n"&"?subject="&"\n"&[Subject]&""&"&body="&[Body]&""
&
"javascript:" & "$.get('" & $url & "', function(){" & "location.reload();" &
"});" & "void(0);"

------------------------------
Chris
------------------------------

5 Replies

  • I suggest this Syntax

    var text url =
    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&apptoken= apptoken " &
    "&_fid_415=1";

    var text MailTo = "mailto:"&""&[Recipient 1]&";"&[Recipient 2]&"\n"&"?subject="&"\n"&[Subject]&""&"&body="&[Body]&"";

    &URL
    & "&rdr=" & URLEncode($MailTo)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • ChrisMolkenbuhr's avatar
      ChrisMolkenbuhr
      Qrew Trainee
      Thanks so much for your reply!

      When i enter this, I get this at the end:

      Hovering over the yellow it says "Expecting Text"
      and if i try to close i get a formula syntax error "a formula cannot end with an assignment to a variable declaration".






      ------------------------------
      Chris Chris
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        My mistake  s/b $URL

        $URL
        & "&rdr=" & URLEncode($MailTo)

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