Leadsモジュールの下のレコードを更新するために、vtigerの更新クエリを適切にフォーマットする方法を知っていますか? http://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.htmlwebservice.php Vtiger updateクエリ文字列php curl投稿
と、クエリにログインし、チャレンジ応答を行うことができたが、私は仕事に更新機能を得ることができなかったと私はないですので、それは次のようになります。
私はこれを、次のされていますクエリがどのように見えるようにするか。これは私がクエリを送信するとき、私は取得エラーです:
stdClass Object ([success] => [error] => stdClass Object ([code] => ACCESS_DENIED [message] => Permission to perform the operation is denied for id))
現在のテストコード:
function updatesomeone(){
global $createduserleadnum;
global $url;
global $sessionID;
global $createduserid;
$customdata = array(
'firstname'=> 'TestAPILead2',//Update First name
'lastname'=> 'TestAPILeadLast2', //Updated Last name
'leadstatus'=> 'New',
'leadsource'=> 'Some Lead Source', //Not Real Lead source
'assigned_user_id'=> 'User-Assigned', //not real user
'cf_755'=> 'A Custom Field', // A Custom Field
'lead_no' => $createduserleadnum, Acquired from other function/stored value
);
$customdata = json_encode($customdata);
$field = array(
'operation' => 'update',
'sessionName'=> $sessionID,
'element' => $customdata
);
$fields_string;
foreach($field as $key=>$value) { global $fields_string;
$fields_string .= $key.'='.$value.'&'; }
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($field));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
$pringjson = json_decode($result);
print_r($pringjson);
}