php - How to create an Activity with vTiger webservice? -


i'm traying create activity using php.
don't know why, last var_dump "boolean false". code.

$today=getdate(); $today=date("y-m-d");  var_dump($today);  $modulet='calendar'; $insertt= array(      'subject'=>'call',  'activitytype'=>'task',  'date_start'=>$today,  'due_date'=>$today,  'assigned_user_id'=>$vtiger->_userid ,  'time_start'=>'09:00:00',  'time_end'=>'17:00:00',  'sendnotification'=>'0',  'status'=>'not started',  'priority'=>'high',  'notime'=>'0',  'visibility'=>'private'  );  var_dump($insertt);  $recordtask = $client->docreate($modulet, $insertt);  var_dump($recordtask); 

check $vtiger->_userid in form 19x1 (module x user_id) , not integer value (e.g. 1). omit if using wsclient.php vtwsclib vtiger.

this docreate code.

    /**  * create operation  */ function docreate($module, $valuemap) {     // perform re-login if required.     $this->__checklogin();      // assign record logged in user if not specified     if(!isset($valuemap['assigned_user_id'])) {         $valuemap['assigned_user_id'] = $this->_userid;     }      $postdata = array(         'operation'   => 'create',         'sessionname' => $this->_sessionid,         'elementtype' => $module,         'element'     => $this->tojsonstring($valuemap)     );     $resultdata = $this->_client->dopost($postdata, true);     if($this->haserror($resultdata)) {         return false;     }            return $resultdata[result]; } 

maybe want var_dump $resultdata instead of result library, boolean


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -