Forum Discussion

MannyCruz's avatar
MannyCruz
Qrew Assistant Captain
8 years ago

Create a button that saves then redirects to a dashboard

Hey guys, I need to create a button that saves and then redirects to a dashboard,

here is the code for the current button,

"<a class=\"Vibrant Primary\" href=\"https://ctc.quickbase.com/db/bmqu5ffji?a=showpage&pageid=87\">Return To Dashboard</a>"

But I need it to save before it redirects me. 

Any help?
  • This is the code that redirects to the dashboard

    "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid())
  • This is actually what you need right here: 
    "<a  class='Vibrant Primary' href='javascript:LinkAway(\"" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pageid=87" & "\");' >Return To Dashboard</a>"
    You should also make sure this setting is turned on in the advanced settings for your table:
    • MannyCruz's avatar
      MannyCruz
      Qrew Assistant Captain
      Hey Eric!

      Sorry, I had to put this on the backburner for a bigger team project we had. I tried this but it gives me the error 

      "Home pages cannot be viewed using this interface. Use act=ShowPage instead"

      Any ideas?

      The saving part worked, so that's good. 
    • MCFNeil's avatar
      MCFNeil
      Qrew Captain
      change the 

      a=dbpage&

      to be

      a=showpage&

      that should fix the issue
    • MannyCruz's avatar
      MannyCruz
      Qrew Assistant Captain
      No dice, now the button does nothing at all haha. I will keep tweaking and see what works, but if you have any ideas as to why, I'm all ears (no quickbase error message for the formula)