Php 更新Zoho api v2符号记录
当我使用updateRecords方法时,要将新数据放入zoho中的字段中,有些字段没有更新。这些字段在标题中有符号,如“?”/”(“Php 更新Zoho api v2符号记录,php,api,zoho,Php,Api,Zoho,当我使用updateRecords方法时,要将新数据放入zoho中的字段中,有些字段没有更新。这些字段在标题中有符号,如“?”/”(“ 如何解决这个问题? 字段:“日期/时间”和“电子邮件确认”为空,但“姓氏”和“用户组”已更新并有数据。 $header = array("Authorization:Zoho-oauthtoken $token", 'Content-Type: application/json'); $fields = ["data"=> ["Last_Name" =&
如何解决这个问题?
字段:“日期/时间”和“电子邮件确认”为空,但“姓氏”和“用户组”已更新并有数据。
$header = array("Authorization:Zoho-oauthtoken $token", 'Content-Type: application/json');
$fields = ["data"=> ["Last_Name" => "User Name",
"Date/Time"=>"2018-09-25T13:23:39+02:00",
"email_confirmed_?"=>"yes",
"User_group"=>"new user"]];
$fields = json_encode($fields);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
$result =curl_exec($ch);
curl_close($ch);
您似乎假定了自定义字段的API名称。您可以尝试使用“”API获取自定义字段的API名称
{
"custom_field": false,
"lookup": {},
"convert_mapping": {
"Potentials": null,
"Contacts": null,
"Accounts": null
},
"visible": true,
"field_label": "Lead Owner",
"length": 120,
"view_type": {
"view": true,
"edit": true,
"quick_create": false,
"create": true
},
"read_only": false,
"api_name": "Owner",
"unique": {},
"data_type": "ownerlookup",
"formula": {},
"currency": {},
"id": "410888000000000553",
"decimal_place": null,
"pick_list_values": [],
"auto_number": {}
}
上面是API的一个示例响应。您可以注意到“字段标签”和“API名称”之间的区别.Hey Eugene!您需要给我们提供更多的信息。例如,发布您编写的代码。举例说明您得到了什么以及希望它说些什么。了解您如何使用API也会很有用,可能是通过编写程序包?