Looking to add a button in form that will save the record and return to the Dashboard

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • Answered
I'm needing a Save button in a form that will save the record I just created and return me to the Dashboard. 
Photo of Dana Hauser

Dana Hauser

  • 424 Points 250 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
I suggest that you make a button on the Dadhboard to Add Record and it has an option as to where to return to after the Save. Will that solve your problem?
There is also another technique to use. Where is the User launching the Add Record from now? If launching off another record like a Parent, then there is another technique.
Photo of Dana Hauser

Dana Hauser

  • 424 Points 250 badge 2x thumb
What I'm trying to do is have a button in a report on the Dashboard that will make a duplicate of that record and bring the user back to the Dashboard.  I've gotten close, but the record doesn't get saved.  I have been able to create a button that duplicates a record and takes you to edit mode for that new record, but I'm hoping to create a smooth flow that takes just one click.

Thanks,

Dana
I’m traveling now and just on an ipad and don’t have the time to post the full syntax.


If you post your current code I can probably adjust it.


The trick is to to change the code for the button which adds the record


This should solve your issue though. I’m using formula variables. If you have not used then before check the help.


Var Text URLONE = and code here to GenAddRecordForm;


Var Text URLTWO = and the URL of the Dashboard page;


$URLONE

& "&NextURL=" & URLEncode($URLTWO)
(Edited)
Well my solution should work for the version where the user duplicates the record in Add Record mode and then Saves.

As for the button to actually AddRecird and return to the Dashboard, I will have to respond tomorrow. It’s past midnight in my current time zone as I’m traveling.
Photo of Dana Hauser

Dana Hauser

  • 424 Points 250 badge 2x thumb
I understand, thanks!
Can you tell me your use case to want to exactly duplicate a record and not edit it. That sounds unusual.
Photo of Dana Hauser

Dana Hauser

  • 424 Points 250 badge 2x thumb
They want to duplicate a record and then have a different person who won't have the duplicate record function edit it later.  This client is a bit odd with some requests.

If I could get a button that saves and returns to the dashboard from the edit record screen, I can work with that.  I can't seem to get that function to work yet.  It will return to the dashboard, but won't save the record for some reason.  I can get a save button to work if you'r starting a new record, but if it's from the duplicate record it won't.  The built in save button saves it, but returns you to the record in view mode.  
Ok, I understand. I will have to test myself next eeek when I’m back in the office.
Meanwhile, can you post your current code?

Also, can you tell me if there are a lot of data entry fields on the form? There is another method using API_AddRecord but it takes some code to populate each field.