Forum Discussion

DanielJohnson2's avatar
Qrew Trainee
3 years ago

URL Button to send API call, open email, then reload

I'm trying to get a button that updates a record, opens the email client to send an email, and then reloads the report it's on, but I keep getting sent to a blank page. I can get the email client to open and for the API call to work successfully, but I can't get the report page to reload. Here's the button formula:

var text URLONE = URLRoot()
        & "db/"
        & Dbid()
        & "?act=API_EditRecord&apptoken=abcdefg123456&rid=" & URLEncode([Record ID#])
        & "&_fid_6=Ready for Compliance Review"
        & "&";
var text URLTWO = ""
        &"?subject=" & URLEncode([PROJECT + Project source]) & " for Compliance"
        & "&body=" & URLEncode([PROJECT + Project source]) & " for Compliance attached.";

var text URLTHREE = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

& "&rdr=" & URLEncode($URLTWO)
& "&rdr=" & URLEncode($URLTHREE)​

Daniel Johnson

2 Replies

  • I also wrapped the last redirect line in a URLEncode() and I'm getting the same result: a blank page with the URL in the top bar.

    Daniel Johnson
    • MarkShnier__You's avatar
      Icon for Qrew Legend rankQrew Legend
      I doubt that is possible ... but post back if you can get this working.

      Mark Shnier (YQC)