Discussions

 View Only
Expand all | Collapse all

Redirect to a record in another table after API Call using Java Script

  • 1.  Redirect to a record in another table after API Call using Java Script

    Posted 11-13-2017 15:27
    I have a button in table1 records to run Javascript code page to create a record in table2 based on some values in table 1 records. After the new record is created in table 2, I would like QuickBase to open that record automatically. How can I do that?


  • 2.  RE: Redirect to a record in another table after API Call using Java Script

    Posted 11-13-2017 16:12
    The API_AddRecord returns the RID.
    https://help.quickbase.com/api-guide/add_record.html#Response_Values

    Append that to the URL you use to view a record in the table replacing rid=123 with the returned RID from the api call. In javascript you can use 
    window.location.replace("url.com/dbid?a=dr&rid="+rid)


  • 3.  RE: Redirect to a record in another table after API Call using Java Script

    Posted 11-13-2017 20:07
    Thanks, it solved my problem!