Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
5 years ago

Edit URL Button not returning

I am using the code below in a formula URL to launch off one table and edit a record in another (I use it to allow users to modify an address at a master level).

It works, but if the user cancels, instead of saves it does not redirect back. Is that expected behavior, and is there a work around?

URLRoot() & "db/bp4w79scc?a=er&dfid=2&rid=" & URLEncode ([Related Site Formula]) & "&z=" & Rurl()

------------------------------
Mike Tamoush
------------------------------
  • Are you crossing apps?

    But you can also try this if you are crossing apps.
    var text Edit = URLRoot() & "db/bp4w79scc?a=er&dfid=2&rid=" & URLEncode ([Related Site Formula]);
    var text Return = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];

    $Edit
    & "&NextURL=" & URLEncode($Return)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      Staying in the same app. Tried the alternate formula you suggested (I use that same thing cross app), but get the same behavior. All works well with Add record API (probably because it has no choice, if you cancel an add record it has to go somewhere...), but Edit Record API does not seem to be able to cancel. If others have this issue Ill check with support and see if it is a known bug.

      ------------------------------
      Mike Tamoush
      ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      FYI - I contacted customer support. They said this is expected behavior. When you cancel, it doesn't run any more code from the button push, so it just lands you on the record.

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