diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index ef7156f478ef214c2a5c4103fba36f5c14136c5c..e52f63ed2faf547bf4455f341527a34f41130856 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -208,7 +208,10 @@ class remoting { //* Execute the SQL query $app->db->query($sql); - $insert_id = $app->db->insertID(); + if ( isset($params['_primary_id'] )) + $insert_id = $params['_primary_id']; + else + $insert_id = $app->db->insertID(); //* Stop on error while executing the sql query