Forum Discussion

GaryBoyd's avatar
GaryBoyd
Qrew Assistant Captain
7 years ago

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

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
  • 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)
  • GaryBoyd's avatar
    GaryBoyd
    Qrew Assistant Captain
    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.
  • GaryBoyd's avatar
    GaryBoyd
    Qrew Assistant Captain
    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.