Skip to main content
Solved

Add Save and Keep Working Button on form for a new record

  • July 17, 2023
  • 0 replies
  • 915 views

Forum|alt.badge.img+6

Hello,

I would like to add a save and keep working button in the middle of my form. This would be used for new records that have yet to be saved before. Is that possible and how can I do it? I can get it to work for existing records but not new ones that haven't been saved yet.



Best answer by ChayceDuncan

There is a data-replaceRID component that you can place for new ones that QB will interpret and land you on the newly created record. This is an example of rich-text field using this: 

var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=%%rid%%";


var text link = "<a href='" & $url & "' data-replaceRid='true' style='font-size: 11pt;margin-left: 5px; margin-top: 0px; height: 33px; width: 160px; text-align:center;background-color:#13294d;color:white;background-image: linear-gradient(to bottom, #13294d 0%, #13294d 100%);' class='SaveBeforeNavigating Vibrant'>Save and Continue</a>";

$link

The two components are rid=%%rid%% in the url and then the data-replaceRID param in the button itself. 



------------------------------
Chayce Duncan
------------------------------

Forum|alt.badge.img+9
  • Registered
  • Answer
  • July 17, 2023

There is a data-replaceRID component that you can place for new ones that QB will interpret and land you on the newly created record. This is an example of rich-text field using this: 

var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=%%rid%%";


var text link = "<a href='" & $url & "' data-replaceRid='true' style='font-size: 11pt;margin-left: 5px; margin-top: 0px; height: 33px; width: 160px; text-align:center;background-color:#13294d;color:white;background-image: linear-gradient(to bottom, #13294d 0%, #13294d 100%);' class='SaveBeforeNavigating Vibrant'>Save and Continue</a>";

$link

The two components are rid=%%rid%% in the url and then the data-replaceRID param in the button itself. 



------------------------------
Chayce Duncan
------------------------------

Forum|alt.badge.img+3
  • Registered
  • March 19, 2026

Hi Chase,

I'm going to try to use this on my form, but I wonder will this button work if I still have required fields further down the form or would I need to either unrequire them or use a form rule somehow to require upon/after the initial save?  Thanks for your help!

Andrew


Forum|alt.badge.img+3
  • Registered
  • March 19, 2026

Thanks Mark!  Could you flesh that out a little more for me?  I'm not totally tracking the Add mode or how that might affect it.  


Forum|alt.badge.img+3
  • Registered
  • March 19, 2026

This is an Applicant form for new applicants so several fields need to be required in Add mode.  I have an embedded Add Employment button, but you must satisfy required fields on parent record before employment button can be used.  is there a way to unrequire those fields until employment is added and save/continue is clicked?  I hope that makes sense.


MarkShnierYou
Forum|alt.badge.img+24

Maybe you can describe your desired workflow step-by-step. That would help me respond.


Forum|alt.badge.img+3
  • Registered
  • March 20, 2026

Sure thing...on Applicants form they enter all general employee data...then they click an embedded Add Employment button on the employment section that has the embedded report for all employment.  The issue is that further down the form there are other required fields preventing the embedded child Employment records from being saved until you fill in those required fields.  So they get warnings to go to this or that tab and it's confusing to them.  My question is is there any way to unrequire those fields further down the form and maybe use a form rule that makes them required ONLY after those child employment records are added.  I'm thinking it won't let me do that but that's what I'm trying to figure out.


MarkShnierYou
Forum|alt.badge.img+24

This sounds like it might be an App, which is open to everyone on the Internet so they can apply for a job. If that is the case, and you are using new forms, you might want to consider enabling tabs and set it to work by steps. That will walk the user through step one step two step three step four in a logical sequence. It will also ensure that the data is saved on step one before it allows moving to step two.

But you still have the problem that if a field is required on the form, it is not going to let you navigate away from that unsaved record to add children employment records if there are required fields on the parent form.  

What you could do though is have step one on the form capture some information, then they would move to step two where they would add their employment information and then you could have a form rule that kicks in that when the number of employment records is greater than zero than you would require some fields on your step three part of the form.