Forum Discussion

JordanBeatty's avatar
JordanBeatty
Qrew Member
3 years ago

URL Button keeps me where I am

I have the following button that user can only click on a record while viewing it

var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_21=1";

var text URLTWO = URLRoot() & "db/" & [_DBID_TASK]
& "?act=API_AddRecord"
& "&_fid_11=" &URLEncode([Related Sub Company (ref)])
& "&_fid_13=" &URLEncode([Record ID#])
& "&_fid_6=" &URLEncode("I have created the DOA for " & [Worker])
& "&_fid_10=" &URLEncode([First Consultant])
& "&_fid_11=" &URLEncode(User())
& "&_fid_8=" &URLEncode(Today())
& "&_fid_7=" &URLEncode(Today());

$URLONE
& "&rdr=" & URLEncode($URLTWO)

Button does exactly what I want it do. It has been awhile but outside of adding a third URL variable redirecting to the record they are already, is there an easy way to have the user just stay inside the record they are in when they click the button?



------------------------------
Jordan Beatty
------------------------------

3 Replies

  • I believe you can just add this to the end of URLTWO. It's a new feature from QB that essentially 'refreshes' the page the user launched from.

    & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())

    ------------------------------
    Mike Tamoush
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      When I do the Refresh page I treat it just link another URL call so it gets the nested syntax for successivee URL calls.

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



      $URLONE
      & "&rdr=" & URLEncode($URLTWO)
      & URLEncode("&rdr=" & URLEncode($RefreshPage))


      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • JordanBeatty's avatar
        JordanBeatty
        Qrew Member

        Well there is a name I am familiar with from some time ago. 

        This worked flawlessly thank you!



        ------------------------------
        Jordan Beatty
        ------------------------------