Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
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
-
- 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
There is no need to restart the web server
-
- 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
it goes in the loop but doesn't go into nuAfterSave() function
-
- 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
try:
Code: Select all
nuFORM.edited = false;
window.nuTimesSaved++; // <--- add this line too
nuProcessAfterSave();
if (!nuOpenPreviousBreadcrumb()) {
window.close();
}
-
- Posts: 337
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 92 times
- Been thanked: 11 times
-
- 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
I created a simple form at test.nubuilder.cloud and nuAfterSave() is triggered for both new and existing records.
To track down the error and verify if nuProcessAfterSave() is being executed correctly, follow these steps:
1. Add a statement immediately before the line
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
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.
To track down the error and verify if nuProcessAfterSave() is being executed correctly, follow these steps:
1. Add a
Code: Select all
debugger;
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;
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.
-
- 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
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
and nuajax
You do not have the required permissions to view the files attached to this post.
-
- 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
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
}
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact: