Hi,

In my current project I have a function (a) in the controller which
calls Crud to create a new record. After which function (a) sends the
user to function (b) using the "next" directive in Crud. I'd like to
have function (b) know the id of the record created which sent them
over so it could store the reference in one of it's fields.

I tried setting args=id, args=[id], args="id" but nothing seems to
work. I'd greatly appreciate your help.

Thanks,

Tsvi Mostovicz

Here follows the code I have at the moment:

def a():
    form = crud.create(db.a,
                       next=URL(args=[id],f='b'))
    return dict(form=form)

def b():
    form = crud.create(db.b)
    a = db(db.b.settings==request.args(0)).select()
    return dict(a=a, form=form)

Reply via email to