Generate Document actions, formerly Print actions, are used to generate a PDF or Word document from a document template and automatically attach it to a record or open it in the browser. When the action runs, the document template selected in the action is populated with values from a record, a file is created, and the file is attached to the field defined in the action or opened in the browser. Print actions create history records and can trigger other actions like sending the file by email, and they're commonly used with action buttons.

Generate Document actions are useful when you want to create a document related to a record and then reference that document at a later time or send it to someone. For example, in a Contract record, you can use an action button and a Generate Document action to create the contract document, attaching it to a field in the Contract record. Similarly, you could use a Generate Document action in an Invoices table to create and attach an invoice to each record.

Create a Generate Document Action

You can access the Actions wizard in several ways, but the easiest way is to select Setup [Table] from the table where you want to create the action.

  1. From the top nav bar, expand the table's drop-down and select Setup [Table].
  2. Select the Actions tab in the Table wizard.
  3. Click Create Generate Document Action.
  4. Name the action and provide a description.

    Once your action is saved, the system automatically adds an A: before your given title to distinguish it as a Generate Document action.

  5. In theĀ Format drop-down field, select your document template.
  6. Choose whether the generated document is opened in the browser or stored in a file field.
    1. If you store the document in a file field, select the field that will hold the file.
    2. Choose whether the file is appended to the field or overwrites existing files.
      Printing options
  7. Define the default file name for the generated document. Use Formula Help to configure an automatic naming convention. It is generally helpful to include the record ID and date in the file name.
  8. Click Finish.

Related articles