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

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • Answered
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
Photo of Gary Boyd

Gary Boyd

  • 820 Points 500 badge 2x thumb

Posted 8 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 52,928 Points 50k badge 2x thumb
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)
Photo of Gary Boyd

Gary Boyd

  • 820 Points 500 badge 2x thumb
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.
(Edited)
Photo of Gary Boyd

Gary Boyd

  • 820 Points 500 badge 2x thumb
Thought I'd see if anyone else had an idea before posting a support case.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,928 Points 50k badge 2x thumb
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.
Photo of Gary Boyd

Gary Boyd

  • 820 Points 500 badge 2x thumb
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...