After a save action is triggered, I'd like to redirect the user back to nuuserhome.
The workflow would go like this:
1. The user clicks a button on nuuserhome
2. A new record is opened (Edit Form)
3. The record is saved by the user
4. --> The user is directed back to nuuserhome
I wrote a function that takes the user back to nuuserhome. Where would be the best place to call this function?
Code: Select all
function goBackToUserHome() {
if (nuFORM.getCurrent().form_code == 'nuuserhome') {return;}
var b = window.nuFORM.breadcrumbs.length;
for (var i = 0 ; i < b ; i++){
if (window.nuFORM.breadcrumbs[i].form_code == 'nuuserhome') {
nuGetBreadcrumb(i);
return;
}
}
}