Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
5 years ago

Redirect on Add Record API

I am using the Add record API in order to copy a record on mobile (there seems to be a glitch where you can't use the native copy functionality on mobile).

Made a button using the add record API which also copies selected fields I want. Works great on mobile, and lands me on the new record I added. However, on mobile, it automatically redirects me from where I came.

Any ideas on how to land on what I just created?



------------------------------
Mike Tamoush
------------------------------
  • Hi Mike,

    For the end of your button do you have any part of the call that is designating a nextURL or a redirect?

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------
    • BarryDolan1's avatar
      BarryDolan1
      Qrew Member
      I'm chiming in here and hoping for some suggestions. I'm using the following to call do save on a submit button, but I want to redirect to another website.

      "<a class= 'Vibrant Success' onclick='DoSave()' href='#https://anywebsite.com'>Click here to submit</a>"

      First: from the web experience, it saves the new record but does not redirect to the specified web page. Instead it goes to the UI page I have pointed to on the EOTI group. I don't like this because it appears to introduce an opportunity to hack security in the database. How can I bypass the default group page and redirect to my website?

      Second: the mobile version shows the native Save & Cancel buttons, and does not redirect anywhere. I would rather just avoid the mobile version and somehow request a desktop site instead. Is this doable from the original link used to access this EOTI form?

      ------------------------------
      Barry Dolan
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        You can go to the Advanced Properties of the app and there is a setting there to force the desktop mode.

        I think that the most reliable way to redirect on save (in desktop mode only) is to specify that in the original link to add the record.

        like this

        var text ADD = your url here to add a a record ;
        var text Redirect = you URL here to redirect to.;

        $URL
        & "&NextURL=" & URLEncode($Redirect)

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