【问题标题】:Update records Zoho api v2 symbols更新记录 Zoho api v2 符号
【发布时间】:2018-09-25 13:12:50
【问题描述】:

当我使用 updateRecords 方法将新数据放入 zoho 中的字段时,某些字段没有更新。这些字段的标题中有符号,例如“?” '/' '('
如何解决这个问题呢?
字段:“日期/时间”和“email_confirmed_?”为空,但“Last_Name”和“User_group”已更新并有数据。

$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(可能通过 Composer 包)也很有用?

标签: php api zoho


【解决方案1】:

您似乎已经假定了您的自定义字段 API 名称。您可以尝试“Field Meta Data”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 的示例响应。您可以注意到“field_label”和“api_name”之间的区别。

【讨论】:

    猜你喜欢
    • 2018-12-01
    • 2019-11-04
    • 2015-10-17
    • 2021-09-25
    • 2019-04-04
    • 2021-10-19
    • 2017-11-15
    • 2022-01-23
    • 1970-01-01
    相关资源
    最近更新 更多