Discussions

Expand all | Collapse all

How to create a save button to save a new record and then redirect to outside URL

  • 1.  How to create a save button to save a new record and then redirect to outside URL

    Posted 06-20-2018 14:59
    I am wanting to replace the default green "Save" button with a button that will save the new record and then redirect the user to a URL outside QB. I'm sure this is not that difficult, but I am stumped. 


  • 2.  RE: How to create a save button to save a new record and then redirect to outside URL

    Posted 06-21-2018 06:17
    Hi Robert, I am also interested in this solution, as we use it for our mobile app, at this point we haven't gotten it right yet, but will keep you posted.


  • 3.  RE: How to create a save button to save a new record and then redirect to outside URL

    Posted 06-21-2018 11:24
    Hi Paul!

    I found this on the QB Exchange (Magic Buttons) and it works perfectly for what I'm wanting to do.


    "<a  class='Vibrant Success' href='javascript:LinkAway(\"" & "https://www.destinationswebpage.com"; & "\");' >Submit & redirect</a>"


    // This works because you have turned on the table's advance settings, "Save parent record automatically when a child record is created."
    // This also is borrowing the LinkAway that gets automatically added for formula url fields.  We are invoking it here so when we are directed to the success.html page the record is first saved.


  • 4.  RE: How to create a save button to save a new record and then redirect to outside URL

    Posted 06-21-2018 13:42
    See this demo which (1) submits the form using  fetch API and FormData and (2) redirects to the FormData info page at MDN:

    Save & Go ~ Add New Favorite Mathematician

    https://haversineconsulting.quickbase.com/db/bnsthzcid?a=nwr

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=667