this is what i'm doing: in a smartgrid use oncreate = dict(purchase_order=[po_oncreation]),
that takes you to your function after record is created, where you know the id. The argument you use is form. def po_oncreation(form): auth.archive last_id = form1.vars.id ...