S
S
Sergey Ch2017-08-02 14:24:52
1C-Bitrix
Sergey Ch, 2017-08-02 14:24:52

Change the value of a custom field in Bitrix CRM when creating a new deal?

When creating a new deal, 2 fields of the list type are added - region and time zone. There is a task at a choice from the list of the region of 1 field to change value of 2 fields - a time zone.
For the task, I think to hang a JS handler on the required select with the name of the custom field and, when it changes, change the value of the 2nd list.
I wrote a draft, but I can’t find the element by document.qyeryselector("select[name=UF_CRM_5822F324B1A4F])
I display the full document value in the console - the result is displayed until the page is completely rendered. I tried to place my code in:
bitrix/www/bitrix/js/crm /interface_form.js
bitrix/www/bitrix/components/bitrix/crm.deal.edit/sale.js
How to include js in a component so that it works after generating a page for creating a new deal?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Ch, 2017-08-03
@elov4anin

He coped with the task. I connected the written JS script to the bitrix/components/bitrix/crm.deal.edit/templates/.default.template.php component template. Worked as it should

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question