after save goto new record

A place for users and developers of the Xataface to discuss and receive support.

after save goto new record

Postby PolderBoy » Mon May 11, 2009 1:51 pm

Dear All,

Client newest wish:
After pressing save button the program should go to 'new record' directly.
(only the user CC which I have created with limited rights)

I have tried with the function afterSave(&$record) and then the link: http://192.168.2.2/BB/index.php?-action=new&-table=D2D

At least that's what I think.

But I can't get it to work.
Anybody?

Thanks,
PolderBoy
PolderBoy
 
Posts: 72
Joined: Fri Apr 03, 2009 12:53 am

Postby fongchun » Mon May 11, 2009 2:43 pm

I made a blog post about this a while ago. Here it is. See if it helps you.
fongchun
 
Posts: 30
Joined: Sun Aug 03, 2008 12:23 am
Location: Vancouver, BC

Postby shannah » Mon May 11, 2009 10:21 pm

For redirecting it is better to use the after_action_new trigger than the beforeSave() trigger. beforeSave/Insert/Update etc.. are called whenever a record is saved. This may happen multiple times per request.
The after_action_new trigger only fires after the "new" action has successfully added the record and is ready to redirect to another page.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby PolderBoy » Mon May 11, 2009 11:29 pm

Thanks,

Thanks fongchun this is exactly what I was looking for.
Thanks Shannah I will use the after_action_new.

PolderBoy
PolderBoy
 
Posts: 72
Joined: Fri Apr 03, 2009 12:53 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved