Bitrix24 Community

Support » Forum » CRM » Updating a company's phone number field using the Bitrix API
Pages: 1
RSS
Updating a company's phone number field using the Bitrix API
I want to update phone numbers with new ones using the Bitrix API. This is my current Javascript code that uses crm.company.update on company with ID 94012:
Code
BX24.callMethod(
   "crm.company.update", 
   { 
      id: 94012,
      fields:
      { 
         "PHONE": [{VALUE: "99999"}],
      }
   }, 
   function(result) 
   {
      if(result.error())
         console.error(result.error());
      else
      {
         console.info(result.data());                  
      }
   }
);

This doesn't update the phone number field, but instead it simply adds another phone number to the company's phone number array. What am I doing wrong?

Thanks!
 Hi Stephan,

Please contact our Helpdesk. Thank you.

Best,

Yana.
Pages: 1
2,000,000+
organizations
are already using Bitrix24