我需要通过 REST API 在 Bitrix24 CRM 中填写自定义字段。当谈到处理标准字段(如 TITLE、TEL 等)时,它可以工作,但如果我尝试通过将自定义字段的属性名称放在请求中来确定自定义字段的价值,端点就会忽略它。这里有一个片段:$company = CRest::call( 'crm.company.add', [ 'fields' => [ "TITLE" => "Company 1" , "COMPANY_TYPE" => "Customer" , "CURRENCY_ID" => 'EUR' , "REVENUE" => "123000" , "ADDRESS" => "st. some address" , "ADDRESS_CITY" => "some city" , "ADDRESS_POSTAL_CODE" => "12345" , "ADDRESS_PROVINCE" => "some province" , "PHONE" => [ ["VALUE" => "1230000000", "VALUE_TYPE" => "WORK"] ,["VALUE" => "1234000000", "VALUE_TYPE" => "FAX"] ] , "EMAIL" => [ ["VALUE" => "me@company1.com", "VALUE_TYPE" => "WORK"] ] , "INDUSTRY" => "MANUFACTURING" , "CUSTOM_FIELD" => "Hey I'm not a standard field and I'm going to be ignored" ] ]);有人有同样的需求吗?我该如何解决?
1 回答
阿晨1998
TA贡献2037条经验 获得超6个赞
我找到了解决方案。只需填写字段 ID 而不是字段名称。字段 ID 类似于“UF_CRM_5AERER454DD4”。通过将其作为键和值放在“=>”之后,该属性得到了增值。
- 1 回答
- 0 关注
- 108 浏览
添加回答
举报
0/150
提交
取消