Forum Discussion
MarkShnier__You
Qrew Champion
If the table is set in properties to auto save then when you push the button and it should save the record before we displaying it.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
ChrisSwirtz
3 years agoQrew Cadet
Hey Mark,
I turned on the auto save as you said and have the button that takes the user to a different form set to open in the same window so it has to navigate away from the current form/screen. When I click on said button it does ask me to save the record first, which is what I want, but when it opens the subsequent form, it is in 'add new" mode instead editing the the new form with the same Record ID and info I just navigated from. It's like the save action doesn't allow for the button formula to pick up the newly created Record ID.
That being said, when I say hit "save & keep working", then hit the button, it works just fine. Which is why I wondered if I could incorporate the "save & keep working" function into the button formula.
------------------------------
Chris Swirtz
------------------------------
- MarkShnier__You3 years agoQrew ChampionChris,
Are you saying that you want to be in Add mode, do some data entry on that form and then click a button to save the record and then continu in edit mode on a different form?
If so, I think that this would work as a formula Rich text Buton
//The code below work to add a record and then blend the user on the newly added //record in edit mode using form ID #10.
var text RID = "%%rid%%";
var text AddShipment = URLRoot() & "db/" & Dbid() & "?a=nwr";
var text EditShipment = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" ;
var text URL =
$AddShipment
& "&rdr=" & URLEncode($EditShipment) & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $URL
& "'>Save and Display in Edit Mode</a>"
//NOTE: The %%RID%% does not seem to like being URLEncoded.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------