Welcome to the nuBuilder Forums!

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

Redirect to another form. Uncaught Error

Questions related to using nuBuilder Forte.
Post Reply
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Redirect to another form. Uncaught Error

Unread post by Giu »

I have this code on a Custom Code's Edit Form.

Code: Select all

function nuAfterSave(){
    nuForm('PRM_MIS_ENFRENTAMIENTOS', '', '', '', 0) ;
}
What I want to achieve, is once the record is created and all event cycle finish, just redirects to a browser form.

My issue is I get an Uncaught error.
ScjrSKapRJ.png
If change last parameter same error. If I remove the function it works.

Some idea?

EDITED:
Web Console empty. Debug window empty.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Redirect to another form. Uncaught Error

Unread post by kev1n »

Pass the form ID (Primary Key) to the function nuForm() and not the Form Code.
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Redirect to another form. Uncaught Error

Unread post by Giu »

ok, I'm stu##d. Thanks, works like a charm
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Redirect to another form. Uncaught Error

Unread post by Giu »

Sorry for bump this, but I noticed this stopped working, and I have no idea why.

I have this code:

Code: Select all

function nuAfterSave(){
   console.log("After save disparado");
    nuForm('code:GRM_MIS_ENFRENTAMIENTOS', '', '', '', '1') ;
}
Nothing is shown in the console, and obviously, redirection is not working either. Page is refreshed and the PHP code on AS is done too.
I tested nuForm function manually and it works as expected.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Redirect to another form. Uncaught Error

Unread post by kev1n »

Does it work when you pass the form ID as first parameter?
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Redirect to another form. Uncaught Error

Unread post by Giu »

kev1n wrote: Wed Jul 17, 2024 7:30 am Does it work when you pass the form ID as first parameter?
Will test, had to stop working on the project some days, but AFAIR failed with ID and code, but again, will test.
Post Reply