Answer the question
In order to leave comments, you need to log in
How to enter a value in AMOCRM via API in a custom Multilist field?
Hello! The essence of the question is in the title. There is a custom field, it looks like this:
On the site, these items are presented as checkboxes, on the server side I accept them, and I get a list of checked fields. How can I add them to amo crm?
Here is the code for adding entries to this multilist:
require_once __DIR__ . '/amocrm.phar';
try {
$amo = new \AmoCRM\Client('profit1', '[email protected]', '3cea6f59960a5ba7d4fe47f4a188c98b');
$lead = $amo->lead;
$lead['name'] = $name;
$lead['responsible_user_id'] = 1659931;
$lead->addCustomField(412109, );
$lead_id = $lead->apiAdd();
$contact = $amo->contact;
$contact['name'] = $name;
$contact['linked_leads_id'] = $lead_id;
$contact['responsible_user_id'] = 1659931;
$contact->addCustomField(396157, );
$id = $contact->apiAdd();
echo "Good";
} catch (\AmoCRM\Exception $e) {
printf('Error (%d): %s', $e->getCode(), $e->getMessage());
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question