Download and Attach a Printable Simultaneously in Creatio Freedom UI
Hi,
I would like to know whether there is a way to both download a printable report and attach it to a record simultaneously in Creatio Freedom UI.
Currently, I am aware of two separate approaches:
- Using the default functionality to generate and download the printable report.
- Using a business process to generate the report and attach it to the record's Attachments section.
However, my requirement is to perform both actions at the same time—when the user generates the report, it should be automatically attached to the record while also being downloaded to the user's machine.
Has anyone implemented a similar solution or can suggest an approach to achieve this?
Any guidance would be greatly appreciated.
Thank you,
Like
Hi Satyam,
Yes, this can be achieved, but you need to handle both actions in one custom flow.
The recommended approach would be:
- Generate the printable report using a business process or custom backend service.
- Save/attach the generated report to the record’s attachment object, for example
ContactFile,AccountFile, or the relevant{Object}Fileschema. - After the file is created and you have the generated file record Id, trigger the browser download using
FileService/Download/{EntityFileSchemaName}/{fileId}.
For uploading/attaching a file manually, Creatio provides POST /FileApiService/UploadFile, where you need to pass parameters such as entitySchemaName, parentColumnName, and parentColumnValue.
So the key point is: do not only call the download service directly. First generate/save the report as a file attachment, then use the generated file Id to download it for the user.
If this needs to happen from a Freedom UI button, the button can call a custom service or process, wait for the generated attachment file Id, and then open the download URL in the browser.
smit suthar,
Hi,
Thank you for the detailed explanation.
I understand the overall approach, but I'm still a bit unclear on some of the implementation details in Creatio.
Would it be possible for you to elaborate on the following points:
- In the case of a Freedom UI button, what would be the recommended way to wait for the file creation and then trigger the download automatically?
- If possible, could you provide a simple end-to-end example (Business Process or Freedom UI implementation) demonstrating the complete flow?
A more detailed example would help me understand how these pieces fit together in practice.
Thank you for your help.