Skip to main content
Question

Button to save record, and edit different record in same table, and redirect

  • April 22, 2018
  • 0 replies
  • 60 views

I am using ?a=API_GenAddRecordForm to open a new record to add. Once I hit Save on the form of this new record, I would like to:
1. Save this record and 
2. Edit a different record in the same table (without opening it)
3. Return to where I came from

Tried this without luck. Looking at the URL, it stops at    &onclick=

"<a class='Vibrant Primary' style=\"width:180px; text-align: center;\"  href='" & 
"db/" & [_MY_TABLE] & "?a=API_EditRecord" &
   "&_fid_10=false" &
   "&rid=" & [Old Record number to be inactivated] &
   "&onclick='DoSaveAdd()'" &
"'>Save Edit Return</a>"

Thank you
This topic has been closed for replies.

It�s probably pretty easy to do if you first edit the record, then put up your Add Record Form.

It would be like

var Text EditMyRecord = put the url here to edit. ;

Var Text PutUpAddRecordForm = put your url here to GenAddRecord;

$EditMyRecord
& "&rdr=" & Urlencode($PutUpAddRecordForm)

  • Author
  • Registered
  • April 23, 2018
Thank you, however I can't edit the old record first. Only if a box is checked on the new record, then I need to inactivate a previous record.

  • Author
  • Registered
  • April 29, 2018
Thought I'd see if anyone else had an idea before posting a support case.

Sorry I don�t think I saw your previous post.

Does the record you are editing with GenAddRecird know the Record iD of the record to be edited. If so, you can use an Action.

  • Author
  • Registered
  • April 30, 2018
Thank you. That seems like a simple solution.  I have the record ID of the record I wish to edit. 
Combining with your post here should give me the full solution. 
https://community.quickbase.com/quickbase/topics/what-triggers-the-selection-to-edit-a-record-with-a...