Create a new document crm.documentgenerator.document.add
We are still updating this page
Some data may be missing here — we will complete it shortly.
Scope:
crm.documentgeneratorWho can execute the method: any user
The method crm.documentgenerator.document.add creates a new document based on a template and data from the corresponding entity. In values, you can pass an array of additional field values.
|
Parameter |
Description |
|
templateId |
Template ID. |
|
entityTypeId |
CRM entity type ID. |
|
entityId |
Entity ID. |
|
values |
Additional field values. |
|
stampsEnabled |
1 (enable), 0 (disable) stamps and signatures. |
Response in case of success
In case of successful execution, the response will be a structure similar to the method crm.documentgenerator.document.get() for the new document.
Why there is no link to pdf in the result of crm.documentgenerator.document.add
- Conversion to pdf is an asynchronous operation. At the time the document generation is completed, the pdf file is not yet available. The minimum conversion time is 8 seconds.
- If a pdf is urgently needed for the document, the only option right now is to make a repeated request to crm.documentgenerator.document.get after 20-30 seconds to retrieve the link to the pdf. If it hasn't appeared, try again.
See also
Continue your study
Copied
Previous
Next