Save and continue to edit record in another form

  • 0
  • 1
  • Question
  • Updated 5 months ago
  • Answered
Is it possible to create a button that saves a record, then opens up the same record in another form in edit mode?


added caveat:The record can only be saved if the required fields have been completed.
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb

Posted 5 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Are you adding a new record or editing an existing record?
(Edited)
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
I need a button for both scenarios, but the problem child is when i am creating a new record
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
That would take a script solution, I believe as the Record ID# is not known until the record is saved, so you can't do a "&NextURL=" type follow on API as you don't know which Record ID to show in edit mode.
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
Thought as much.  if the record is already saved, how would I create the button to open the record in a different form in edit mode?
Photo of Chad Brandmire

Chad Brandmire

  • 968 Points 500 badge 2x thumb
I'd recommend getting the Magic Buttons App from the exchange. You'll find some answers in there
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
I've used Magic buttons extensively - But i cant find a button to invoke the editing of a record using a specific form ID
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
 You can specify the form ID to edit a record, but you need to know which Record ID to edit.

URLRoot() & "db/" & dbid() & "?a=er&rid=" & [Record ID#] & "&dfid=10"

but when you save it would display the record in the default form ID, so you would need to use 

var text EDIT = URLRoot() & "db/" & dbid() & "?a=er&rid=" & [Record ID#] & "&dfid=10";
var text Display = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#] & "&dfid=10";

$Edit
& "&NextURL=" & URLEncode ($Display)

Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
Ok, so the dfid is then the form id.  I think I can make this work - Thanks Mark, ill update you once i got it.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,464 Points 50k badge 2x thumb
to remember dfid talk like a Chicago gangster

"da form ID is ".....
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
Ha ha ha!