Forum Discussion

DanMcLaughlin's avatar
DanMcLaughlin
Qrew Trainee
5 years ago

Save and redirect to grandparent

I am working on a button that will allow my users to save and go the the related grandparent.  What is the code around thr Rid  to make this happen?

var text redirectafter = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageName=success3.html";

"<a class='Vibrant Danger' style=\"width:310px; text-align: center;\" onclick='RedirectURL.value=\"https://scenicsolutionsllc.quickbase.com/db/bqnffbzdf?a=dr&r=bn&rl=ck" & $redirectafter & "\";editform.rl.value=(\"\");DoSave()'; href='#' > Save and Go to Estimate</a>"

------------------------------
Dan McLaughlin
------------------------------

  • replace this 

    ?a=dr&r=bn&rl=ck"

    ?a=dr&rid=" & [record ID# of the Grand Parent]

    you will get the record ID# of the grand parent by a lookup off the parent record which might be called [Related Parent], but on the lookup call it something like [Record ID# of Grand Parent]  (obviously substitute the real name of the table)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • DanMcLaughlin's avatar
      DanMcLaughlin
      Qrew Trainee
      Ok I did that  but now I  keep getting an error that it cannot find the record.  I am assuming i have a parsing error in here somewhere?

      var text redirectafter = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageName=success3.html";

      "<a class='Vibrant Snowy' style=\"width:310px; text-align: center;\" onclick='RedirectURL.value=\"https://scenicsolutionsllc.quickbase.com/db/bqnffbzdf?a=dr&rid="&[LINE ITEM - Related Cost Estimate]& $redirectafter &"\";editform.rl.value=(\"\");DoSave()'; href='#' > Save and Go to Estimate</a>"

      ------------------------------
      Dan McLaughlin
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I suggest that you look at value in the field for [LINE ITEM - Related Cost Estimate] to see if that is in fact the Record ID that you want to display.



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