Hi Harm.
I tried this like you said. It ends the browser debbuger after run the line: oDD.doSave();
After execute it the screen is cleaned how if the process was concluded ok, but it doesn´t run the aftersave function and data wasn´t saved
From Studio it does exacly how it should, it stopps in aftersave function breakpoint and save datas.

          if (confirm('Deseja Realmente Confirmar este Agendamento?')) {
            	var oForm = vdf.getControl("AGENDA_form");
                var oDD = oForm.getDD("ITEAGEND");