Very helpful, thanks!  That and the following thread helped me get it
working:

*
http://groups.google.com/group/web2py/browse_thread/thread/ca023e57bbc3a963/409a637d597057ae?lnk=gst&q=crud+update+delete#409a637d597057ae
*

After posting, I was redirecting to edit mode on the same item by
referencing its id.  However, doesn't work if the item is deleted.  Thread
above provided code for having a redirect if the item is updated (using
next) and a different action if the item is deleted (using ondelete with a
lambda function)


On Thu, Oct 14, 2010 at 1:33 AM, weheh <richard_gor...@verizon.net> wrote:

> See thread:
>
> http://groups.google.com/group/web2py/browse_thread/thread/373ba9cee9ea320c/a5c8093e3a6ab2e0?lnk=gst&q=id+of+last+record+added+using+crud#a5c8093e3a6ab2e0
>
> On Oct 14, 2:10 am, Audra Rudys <sphin...@gmail.com> wrote:
> > How does one capture the id of a newly created record for redirect?
> >
> > Desired workflow: User adds record, pushes submit, record added and goes
> > into "edit mode" for further work.
> >
> > I have 2 controls: add(using crud.create) and update (using crud.update).
> >  After adding, I'm trying to redirect to update using the next=URL(), but
> I
> > need the id of the record I just created, -- is there a way to get this?
>  Or
> > should I be approaching this differently to get the desired results?
> >
> > Thanks,
> > Audra
>

Reply via email to