Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v diff -u -r1.94.6.13 -r1.94.6.14 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 12 Dec 2014 08:30:21 -0000 1.94.6.13 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 12 Feb 2015 15:42:46 -0000 1.94.6.14 @@ -92,11 +92,18 @@ } return $vars } + Form instproc get_id_field {} { + my instvar data + if {[$data istype ::xo::db::CrItem]} { + return item_id + } + return object_id + } Form instproc new_data {} { my instvar data #my log "--- new_data ---" $data save_new - return [$data set object_id] + return [$data set [my get_id_field]] } Form instproc edit_data {} { #my log "--- edit_data --- setting form vars=[my form_vars]" @@ -111,7 +118,7 @@ $data rename -old_name $old_name -new_name $new_name } } - return [$data set object_id] + return [$data set [my get_id_field]] } Form instproc request {privilege} {