G
G
Guliver992021-04-16 12:06:36
CRM
Guliver99, 2021-04-16 12:06:36

How to display a component or a dialog box on the AddEventHandler event in bitrix?

To change transaction data in bitrix crm, for example:

// php
AddEventHandler("crm", "OnAfterCrmDealUpdate", "someFunction");


it is necessary to display a dialog box with the content (let there be a form c select).

How to implement it?

PS: boxed version of Bitrix24

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2021-04-16
@Guliver99

I would do this:
Create an ORM table . On the OnAfterCrmDealUpdate event, write to it the IDs of those users who need to show the popup.
On the OnProlog or OnEpilog event, check for the need to output popup (getList to the table described above. Specify the ID of the current user in the getList parameters).
After a successful check, connect the js script that would open the popup.

Bitrix\Main\Page\Asset::getInstance()->addJs("/path/to/script/file.js");

In popup, make an ajax request to the script that contains the component/form. After showing the form in the orm table, somehow mark the display (delete the line or change some field for it)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question