How to go to a specific page/record when you hit 'save'?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have one record that ends up having a relationship with another table that leads you to another table. Once you save a record on the 3rd table (two relationships away from original record) how do I get QB to take the user back ot the original record instead of the previous page?
Photo of Stephony (DBH)

Stephony (DBH)

  • 586 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,256 Points 50k badge 2x thumb
There is a syntax which involved suffixing a URL with &NextURL = .... to control where a record goes after the save, but that has to to built into where the user launches off of to add a record.  

Can you tell me where the user launches off of to get to that third record?  Is there a URL we can modify such as one which is doing act=API_GenAdRecordForm?
Photo of Stephony (DBH)

Stephony (DBH)

  • 586 Points 500 badge 2x thumb
URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Record ID#])& "&z=" & Rurl()
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,256 Points 50k badge 2x thumb
Ah, so we are in luck :)

var text URLONE = URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Record ID#]);

var text URLTWO = Urlroot() & "db/" & [_DBID_TABLE name of where you want to land the user] & "?a=dr&rid=" & [Related Table 1 record # field for the record to show];

$URL
& "&rdr=" & URLEncode($URLTWO)