Page 2 of 2
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 10:15 am
by kev1n
There is no need to restart the web server
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 11:16 am
by yvesf
it goes in the loop but doesn't go into nuAfterSave() function
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 11:19 am
by kev1n
try:
Code: Select all
nuFORM.edited = false;
window.nuTimesSaved++; // <--- add this line too
nuProcessAfterSave();
if (!nuOpenPreviousBreadcrumb()) {
window.close();
}
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 11:30 am
by yvesf
doesn't correct either
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 4:15 pm
by kev1n
I created a simple form at
test.nubuilder.cloud and nuAfterSave() is triggered for both new and existing records.
kev1n wrote: ↑Mon Aug 11, 2025 7:35 am
It’s possible that some other code or settings in your form or setup are preventing the event from triggering.
To track down the error and verify if
nuProcessAfterSave() is being executed correctly, follow these steps:
1. Add a
statement immediately before the line
nuProcessAfterSave();
, save the changed and then log out, then log back in to nuBuilder.
2. Open the browser's developer console.
3. Save the form
4. When execution pauses at the
statement, check whether
nuProcessAfterSave() is called.
5. After the debugger pauses, step through the code using the Step Over (F10) or Step Into (F11) function in the developer console to observe whether the
nuProcessAfterSave()
line is hit.
If you use Step Into (F11), you should be taken inside the
nuProcessAfterSave() function. This confirms that the function is being called.
6. (Optionally): Once inside, continue stepping through the function line by line to check if all expected operations are performed.
Additionaly, create a simple form and test if it works there.
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 6:16 pm
by yvesf
in fact, my save and close is done in an edit popup form and even with the save action button you have to click twice to fire the nuAfterSave(). Haven't done more investigation, something I will look in one week or so
2025-08-11_150213_689a14050a3ea_nuBuilder_backup.zip
and nuajax
nuajax.js
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 11, 2025 9:12 pm
by kev1n
Thanks — I was able to replicate the issue, and hopefully
this resolves it:
Code: Select all
if (instruction === 'close') {
nuFORM.edited = false;
window.nuTimesSaved++;
nuProcessAfterSave();
nuCloseAfterSave();
} else {
nuForm(formId, data.record_id, data.filter, data.search, 1); //-- go to saved or created record
}
Re: Difference between nuActionSave and the Save in the action bar
Posted: Mon Aug 18, 2025 4:14 pm
by kev1n
Hi Yves,
Could you test the fix?
Re: Difference between nuActionSave and the Save in the action bar
Posted: Tue Aug 19, 2025 12:20 am
by yvesf
It works, thx Kev1n, Yves