D
D
Dmitry2021-10-15 18:57:34
Bitrix24
Dmitry, 2021-10-15 18:57:34

How to add email attachment files to a lead?

Good evening. The essence of the task: when an incoming mail message is created, a lead is created, it is necessary to attach letter attachments to the custom property of the lead (type File).

What is available: when creating a lead, I receive the id of the lead as a listener, then I get a list of activities for the lead, I pull out the id of the letter, then its contents. Files are stored there with two keys, these are id and url, url like " https://***********/bitrix/tools/crm_show_file.php... " .
I tried to insert the file id into the field ("UF_CRM_1634296230" => 692) - it doesn't work. Checked through CFile::GetFileArray - not the same file by id at all. I tried to get the file via file_get_contents using the link to show the file - it doesn't work.

Tell me where to dig, maybe someone came across this, thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-10-16
@Deemc

Decided

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question