Forum Discussion

Stephony_DBH_'s avatar
Stephony_DBH_
Qrew Cadet
8 years ago

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

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?
  • 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?
  • URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Record ID#])& "&z=" & Rurl()
  • 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)