CRM Bitrix 24 Boxed version.

When creating a new transaction, 2 fields of the list type are added - region and time zone. There is a task when choosing from the list of region 1 field to change the value of 2 fields - time zone.

For the task, I think to hang the JS handler on the required select with the name of the user field and change the value 2 of the list when changing it. I wrote a stub, but I can not find the item by

document.qyeryselector("select[name=UF_CRM_5822F324B1A4F]) 

I bring the full value of document to the console - the result is displayed before the page is completely rendered.

I tried to put my code in:

 bitrix/www/bitrix/js/crm/interface_form.js bitrix/www/bitrix/components/bitrix/crm.deal.edit/sale.js 

How to connect js to the component so that it works after the generation of the new deal creation page?

  • BX.ready (function () {did your code} try? - Oleksandr
  • Already solved the problem by connecting your script at the end of the component template crm.deal.edit - Sergey

1 answer 1

Already solved the problem by connecting your script at the end of the crm.deal.edit component template