Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Difference between nuActionSave and the Save in the action bar

Questions related to using nuBuilder Forte.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Difference between nuActionSave and the Save in the action bar

Unread post by kev1n »

There is no need to restart the web server
yvesf
Posts: 337
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 92 times
Been thanked: 11 times

Re: Difference between nuActionSave and the Save in the action bar

Unread post by yvesf »

it goes in the loop but doesn't go into nuAfterSave() function
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Difference between nuActionSave and the Save in the action bar

Unread post by kev1n »

try:

Code: Select all

nuFORM.edited = false;
window.nuTimesSaved++;  // <--- add this line too
nuProcessAfterSave();
if (!nuOpenPreviousBreadcrumb()) {
	window.close();
}
yvesf
Posts: 337
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 92 times
Been thanked: 11 times

Re: Difference between nuActionSave and the Save in the action bar

Unread post by yvesf »

doesn't correct either
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Difference between nuActionSave and the Save in the action bar

Unread post 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

Code: Select all

debugger;
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

Code: Select all

debugger;
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.
yvesf
Posts: 337
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 92 times
Been thanked: 11 times

Re: Difference between nuActionSave and the Save in the action bar

Unread post 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
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Difference between nuActionSave and the Save in the action bar

Unread post 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
}
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Difference between nuActionSave and the Save in the action bar

Unread post by kev1n »

Hi Yves,

Could you test the fix?
Post Reply