Bitrix24 API : How to update a CRM Deal file custom field

标签 bitrix

我们正在使用 Bitrix24 云版本并在 CRM Deals 创建了一个自定义字段。

如何使用 Bitrix API 更新此自定义字段(类型:文件)?

已经尝试过:

$fileContent = file_get_contents(dirname(__FILE__)."/images/MM35_PG189a.jpg");

$batch = array(
  'deal_update' => 'crm.deal.update?'
    .http_build_query(array(
      'id' => 2,
      'fields' => array(
        'UF_CRM_1516125473' => array(
          'filedata' => array(
            'file.jpg',
            base64_encode($fileContent)
          )
        )
      )
    ))
);

$data = call($_SESSION["query_data"]["domain"], "batch", array(
  "auth" => $_SESSION["query_data"]["access_token"],
  "cmd" => $batch,
));

最佳答案

变量名错误:filedata -> fileData

关于Bitrix24 API : How to update a CRM Deal file custom field,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48774353/

相关文章:

Bitrix 任务报告

java - 如何在 Bitrix 中为第三方应用程序实现 OAuth?

linux - Apache 未在 CentOS 7 服务器上运行

bitrix - 无法在 bitrix 中发送用户邀请和邮件

javascript - CMS Bitrix 不加载脚本