Docomotion uses a custom button in a Salesforce Object, named Generate Document, in order to generate an output from a Salesforce Object. This button retrieves all Standard and Custom fields in the Object so that they are available to merge into a Form you designed.
The Document Generation screen is Lightning Ready.
The Generate Document button also retrieves data from Related Objects: Lookup fields (1 to 1 relation) and other Related Objects in Salesforce (called in Docomotion Children), which are presented as a table in the output document.
The Object where you place your button is called the Main Object.
Salesforce end-users can click the Docomotion Generate Document custom button from a Salesforce record. This merges data from the record and the related objects into the selected Form, resulting in an output document populated with data from that specific Salesforce record and its related records.
Adding Documents to the Generated Output
(From Version 10) It is possible to include in the generated output additional PDF and HTML documents that are included in the form or in the record. The documents can be from the Documents object as well as PDF and HTML files that were added to the libraries.
If the form or record include additional documents, generators can add the documents when generating output.
Generators can add documents to an object’s record. Administrators and Designers can add documents to a form or object’s record. Documents can also be added to the form as Required, this means that when generating output, these documents will automatically be added to the output and cannot be removed. For example, if Sales reps must include Terms&Conditions in each quote sent from Salesforce, this document can be added as Required to the Forms of the Quote object. Documents added to records cannot be designated required.
There are several available output channels:
- Mail: Send email with the output as an attachment (automatically selected if you chose Mail Body Format). When selecting the Mail output channel, authorized output generators can select as the body of the email an email template. The templates list displays all email templates residing in the Docomotion Emails folder.
- Download: Download the document to your local workstation
- Document: A Document Object is created in Salesforce.
- Notes and Attachments: The output is added to the Object record feed.
- File: The output is stored in Files and can be seen in the related list of the record.
- Chatter File: The output is added to the Chatter info and stored in Files.
- Link: See Link Output Channel.
- Google Drive (optional): Save the output to Google Drive. To save the output to Google Drive you need to configure Docomotion to work with Google Drive. See configuration Docomotion to Work with Google Drive.
To generate output you can use Chrome, Firefox or Internet Explorer version 10 or above.
To generate documents:
1. In Salesforce select a record form which you want to generate a document.
If the record or Form include additional documents, you can add any of these documents to the generated output.
Note: This option does not support tagged PDFs.
The Additional Documents pane displayed the documents that can be added to the generated output (included in the Form or in the record) in the order according to their definition with Form documents preceding record documents ①, and the documents that are defined as required for the Form② (with a red icon). Use the right/left arrows ③ to add/remove documents and the up/down arrows ④ to change the order by which the documents are added to the output. Note that the generated output and documents defined in the Form as required cannot be removed. You can, however, change their default order.
2. Click Generate Document. See Configuring the Generate Document Buttons.
3. Select the Form from which you want to generate documents (if the Form is not in Recent Items view, select All and click Go to display all Forms of the Object).
The Document Generation screen displays all Forms published/activated for the Main object.
- Users with Docomotion Admin or Designer permission sets will see both active and published forms.
- Users with Docomotion Generator permission set will see only the published forms without the Status column.
You can now click Show Template to view the template which is a Form without the data or Preview Document which results in an output (in PDF format) with data retrieved from the database based on the Form design.
Note on the generation / preview / view of PDF:
You might get the PDF in two ways depending on your browser settings:
- Downloaded version inside the browser.
- Immediately display the document inside the browser. In the following settings: chrome browser type: chrome://plugins/ Enable chrome PDF viewer.
4. In the case of Forms with Interactive Collection tags, or when selecting an email output channel or Mail Body format, you also need to select a recipient.
5. Select the Output Format:
- Docx (not available for Interactive Forms)
If you select Mail Body output format and the Additional Recipients option is enabled in your organization, you can add recipients to the email using lookups.
When you select the Mail Body output channel the Select Recipient pane is displayed.
6. Select the Output Channel:
- Mail: send an email with the output as an attachment (automatically selected if you chose Mail Body Format).
The templates list displays all Salesforce templates residing in the Docomotion folder. See Using Email Templates.
- Download: download to your local workstation
- Document: create a Document Object in Salesforce.
- Notes and Attachments: add to the Object record feed
- Chatter: add to the Chatter info.
- Link: See Link Output Channel. When you select Link, the Mail Output Channel is selected and the HTML Output Format is automatically selected.
- Google Drive (optional): If Google Drive is configured, the Output File Name box displays the default Google drive directory. You can click Browse to a different location of the Google Drive.
7. In the Output File Name box leave the file name set in the Generation Settings section or change the name of the output file. By default the file name is the record name, unless defined otherwise in the Generation Settings.
8. Click Generate; the documents are generated in the format and output channel you selected.