AnsweredAssumed Answered

Add created_by and modified_user_id  using rest v10 ?

Question asked by Maulik Shah on Jan 13, 2016
Latest reply on Jun 2, 2016 by Tevfik Tümer



I am trying to insert new record in leads module in Sugar 7 with rest v10 API.

Please find code below :


$set_entry_arguments = array(

   "id" => "d25d5bd0-3a03-3712-ea72-569641e440c0",

   "last_name" => "test lead13434",

   'created_by' => 'ce81c520-ad7b-9d3f-0335-56960953bb5a',

   'modified_user_id' => 'ce81c520-ad7b-9d3f-0335-56960953bb5a',


$url = "";

$module_name = "Leads";

$url = $url . "/{$module_name}";

$response = $this->call($url, $this->access_token, 'POST', $set_entry_arguments);


i have authenticate sugarcrm with admin user and now i want to create lead record with different created by user.

With this code lead record created successfully with last_name but created by is not inserted with this provided user id. It will take id authenticated user id.


Can anybody please guide me ?