Overview

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.

For information on how to set up the Generate Document button refer to Configuring the Generate Document Button.

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.

The maximum size of an output file (including attached documents and pictures) in 6 MB for synchronous generation and 12 MB for asynchronous generation.

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 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 should include Terms&Conditions for 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 required.

See Using Salesforce Documents and Files in Generated Output.

Output Channels

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.
  • Chatter: The output is added to the Chatter info.
  • 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.

The information and options in the Document Generation window depend on the default generation settings for your role. See Defining the Default Form Generation Settings.
You can restrict the access to all or some Form records and provide access permissions to specific organizational users. Users will only see Forms they are authorized to access. See Restricting Access to Forms / Sharing Settings.

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.

(from Version 10) If the record or Form include additional documents, you can add any of these documents to the generated output.

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.

Notes:
Users with Docomotion Admin or Designer permission set will see both active and publish forms.
Users with Docomotion Genertor 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 the email output channel you also need to select one recipient.

By default, the Contact list includes all contacts and leads of the Main Object. For more information refer to Generating Output – Select Recipient.

5.  Select the Output Format:

  • PDF
  • HTML
  • Docx (not available for Interactive Forms)
  • Mail Body (not available for Interactive Forms, since most email clients block JavaScript needed for submitting interactive data)

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.
    When generating output from a Custom Object using the email output channel, you need to edit the Custom Object and enable the following optional features:
  • 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.
To save the output to Google Drive you need to configuration Docomotion to Work with 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.

If you selected the Chatter or Notes & Attachments output channel, you cannot use special characters in the file name as this generates an 4002 error.

8.  Click Generate; the documents are generated in the format and output channel you selected.

For details regarding the target of the generated output and what you can do with it, see Handling and Reviewing the Generated Output.