I
I
IliaMal2020-10-19 09:13:33
1C-Bitrix
IliaMal, 2020-10-19 09:13:33

How to programmatically fill in a custom field when creating a deal from a company in a boxed Bitrix24?

Hello.

You need to pass a custom field with a roistat icon when creating a deal from a company. The problem is that when creating a deal from a lead, custom fields are transferred, but if you create from a company, then no.
In those. I was told by the support that there was no way to transfer the field from the company, I decided to implement it myself, the only problem is that I don’t know how to work with events in the boxed Bitrix24.

I tried the same as on the 1s-Bitrix website. In init.php dspdfk event and logged an array

AddEventHandler("crm", "OnAfterCrmDealAdd", Array("CrmDeal", "DealAddRoistat"));
class CrmDeal
{
    function DealAddRoistat(&$arFields){


        AddMessage2Log('CrmDeal: '.print_r($arFields, true));

    }
}

As a result, the log is empty, the script did not work.

Perhaps it is necessary to work with events in Bitrix24 in some other way?
Or is there another way to populate the roistat custom field when creating a deal from a company?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Paimurzin, 2020-10-19
@rusellsystems

Alternatively, you can use a business process to create a deal or a webhook

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question