Forum Discussion

EricEvans_Varga's avatar
EricEvans_Varga
Qrew Cadet
7 years ago

Trying to redirect to the parent table after saving/editing a record.

I have a Parent table (VIP) where I am trying to add a Child record (VIP Request Record) but have the landing (after saving the child) to be on the parent record.
The launch into adding a child record will be off of a report on a homepage, using a custom button.

I tried the method referenced in this question: 
https://community.quickbase.com/quickbase/topics/trying-to-redirect-to-the-parent-table-after-saving-editing-a-record
But the outcome is not as expected; the redirect to the parent record is happening however my child record is not saving.

My formula:
"<a class='Vibrant Success'  onclick=' DoSaveAdd()' href='"&URLRoot()&"db/" & [_DBID_VIP] & "?a=dr&rid=" & [Related VIP Traveler] & "'>Save</a>"

Where [_DBID_VIP] is my Parent table and [Related VIP Traveler] is my Parent record.

What am I doing wrong?

  • It's a Formula URL field where the user must enter notes:
    URLRoot() & "db/" & [_DBID_VIP_INTAKE] & "?a=API_GenAddRecordForm&_fid_6=" & URLEncode ([Record ID#])& "&z=" & Rurl()

    Where fid 6 is the related parent record
  • I wonder if the problem is that you are launching off a report which is on the home page as opposed to a report on a table.

    No matter try this,

    var text AddChild =  URLRoot() & "db/" & [_DBID_VIP_INTAKE] & "?a=API_GenAddRecordForm&_fid_6=" & URLEncode ([Record ID#]);

    var text DisplayParent = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];

    $AddChild
    & "&NextURL=" & URLEncode($DisplayParent)