Forum Discussion

ZVIBOCK's avatar
ZVIBOCK
Qrew Cadet
7 years ago

How do I make changes save and return to where record was opened from

I have a button button that sets the record status to complete and then returns the user to his home page. The code is 

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&apptoken=dxegd2ebb2dznd3pu7vi9wf2isr" &
    "&_fid_16=COMPLETED" &
    "&_fid_13= " & Today() 
&  "&rdr=" &
    URLEncode(URLRoot() & "db/" & Dbid()) 

However users are complaining that they want to be returned to where they came from. Also I need to do a general save on the record to capture chnges that the user might have amde to to other fields. Is there a way to make the changes and then trigger the native save.  

4 Replies

  • Do you mean to leave them back in view or edit mode on the record?  Is that what you mean by "where they came from"?
  • No they usualy open it directly in edit mode but they can open the record from multipule places. So for example if they opened it from a member with an embedded report they would like to return to the member they came from, if they opened from a report on the home page they would like to return to the home page etc.  This is the default behaivor of the save button but haveing a hard time figuring out how to replicate it.
    • ZVIBOCK's avatar
      ZVIBOCK
      Qrew Cadet
      Would it be possible to somehow grab the native redirect URL that the save button uses and append it to the url buton