Nevermind, dup of my own question from a couple months back......
-Jim
On Thursday, February 13, 2014 2:14:15 PM UTC-6, Jim S wrote:
>
> Wondering how I can use the oncreate callback to redirect to my edit page
> after I just created a new record.
>
> This is my callback function:
>
>
> def postCreate(form):
> equipOrderId = form.custom.dspval.equipOrderId
>
>
> redirect(URL('index',args=('edit','equipOrder',equipOrderId),user_signature=True))
>
> return
>
> But, equipOrderId is always None when I get it here. My grid call looks
> like this:
>
> grid = SQLFORM.grid(query, fields=fields, left=left,
> orderby=orderby, create=create, details=details,
> editable=editable, deletable=deletable,
> csv=False, search_widget=search,
> searchable=True, links=links, oncreate=postCreate,
> paginate=15, maxtextlength=45)
>
> equipOrderId is the id field of my newly created record. How can I access
> it in my callback function?
>
> -Jim
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.