Skip to main content
Question

Disable popup that reads ""Save this record?

  • Jun 18, 2017 10:57 AM UTC
  • 8 replies
  • 83 views

I understand that overriding the safety measures that QB has put in place is not a good idea but I feel there are always exceptions to the rules.  I have a table in which I have fields that the user inputs information into and with a button click I create the child records, except there is popup that comes up and drives my users mad. These fields are cleared out upon save so I am not concerned about loss of data.  Saving Parent record option does not work as it causes issues with my code.
This topic has been closed for replies.

8 replies

So are you saying that using to checkbox to automatically save the record when navigating away or adding children manually does not work in your use case?

Forum|alt.badge.img+3
Have you tried the setting in Advanced Settings on the table to automatically save the parent when adding a child? Not sure if this applies to your workflow without more details though.

  • Author
  • Qrew Cadet
  • Jun 18, 2017 8:23 PM UTC
I'm not using a checkbox to automatically save the record, I really don't need the record to save I just need the values for that instance.  I have field where the user can input the number of units in a building which tells me how many child records to create, then they use a grid edit report located in the table to complete everything.  I tried using the save parent when adding a child but when the user clicks the button it does an automatic save then calls my code page which will mess up.  Hope this make sense.

  • Author
  • Qrew Cadet
  • Jun 18, 2017 8:31 PM UTC
Here is what the table looks like.

  • Author
  • Qrew Cadet
  • Jun 19, 2017 2:39 AM UTC
After doing some searching and rework I was able to get around this issue by implementing Dan Diebolt Save and Scooby Doo Technique.

  • Qrew Corporal
  • Jun 19, 2017 3:54 PM UTC
FWIW, there are a couple of other things you can do:

(1) Simply noop QuickBase's ConfirmLinkAway function by redefining it with no body: 

function ConfirmLinkAway(){} 
(2) Define a Mutation Observer so that when the dialog appears your code immediately clicks on the Save button. 

$(function(){
  var observer = new MutationObserver(function(mutations) {
    
    mutations.forEach(function(mutation) {
      if (mutation.type == "childList" && mutation.target.getAttribute("id") == "dialogLinkAway") {
        $("#dialogLinkAway button:contains(Save)").click();
      }
    });
  });
  var body = document.body;
  
  var config = {
    childList: true,
    subtree: true
  };
  observer.observe(body, config);
});

I didn't test this code but it should work. See this example of a Mutation Observer that focused on the Save button when a certain Form Rule Dialog Box appeared:

Form Rule Message Box - Dismiss With Enter Rather Than Click
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=274

  • Author
  • Qrew Cadet
  • Jun 25, 2017 8:43 AM UTC
Thanks for the response Dan, I haven't tried this out yet but I will.  Your Save and Scooby Doo Technique is awesome and actually worked out better for this situation.

  • Qrew Corporal
  • Aug 16, 2018 6:25 PM UTC
New to this and seeing something similar, I want a form to hold temp values until we have an invoice that is suitable, when I update fields we get a message box asking to save so all values are lost.
Where should the code "function ConfirmLinkAway(){}" be stored?  In the table, form, code page and how should it be called?