DocumentGenerationSetting

Represents an org’s settings for automatic document generation from templates.

In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for details.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

DocumentGenerationSetting components have the suffix documentGenerationSetting and are stored in the documentGenerationSettings folder. The .settings files are different from other named components because there’s only one settings file for each settings component.

Version 

Introduced in API version 52.0.

Special Access Rules 

DocumentGenerationSetting is available if your org has the DocGen platform license and related addon and user licenses.

Server-side document generation isn’t enabled by default, and selecting isServerSideDocGenEnabled isn’t sufficient. To enable this feature, see the Request Access to Server-Side Document Generation knowledge article.

Fields 

batchDocGnrnPctLimitPerHour 

  • Type: double
  • Required: No

documentTemplateLibraryName 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the library that stores the document templates to which this setting applies.

generationMechanism 

  • Type: GenerationMechanism (enumeration of type string)

  • Required: No

  • Description: Specifies how and where a document is generated.

    The default is ClientSide.

  • Possible values:

    • ClientSide — Generates documents in the browser with an optional preview.
    • ServerSide — Generates documents on the server and attaches them to the objects for which they’re generated.

guestAccessNamedCredential 

  • Type: string
  • Required: No
  • Description: Specifies the named credential that lets guest users generate documents.

inProgDocGenRqstTmot 

  • Type: int
  • Required: No
  • Description: The time interval (in hours) after which InProgressDocumentGenerationProcess records (single point or batch request) are terminated and the request status is updated to Failed. Specify a valid whole number between 1 and 24. The default value is set to 6.

isBatchDocGnrnEnabled 

  • Type: boolean
  • Required: No

isInProgRqstTmotEnab 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the InProgress DocGen Request Time Out (hrs) is enabled (true) or not (false).

isServerSideDocGenEnabled 

  • Type: boolean
  • Required: No
  • Description: Enables server-side document generation if the prerequisite license is present in the org.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. Specifies a name for the setting, such as DocGen.

previewType 

  • Type: PreviewType (enumeration of type string)

  • Required: No

  • Description: Specifies the format of previews of generated documents.

    The default is PDF.

  • Possible values:

    • PDF — Displays how the generated document looks in PDF format.
    • Thumbnail — Displays a miniature representation of the generated document.

Declarative Metadata Sample Definition 

The following is an example of a DocumentGenerationSetting component.

1<?xml version="1.0" encoding="UTF-8"?>
2<DocumentGenerationSetting xmlns="http://soap.sforce.com/2021/10/metadata">
3   <documentTemplateLibraryName>DocgenDocumentTemplateLibrary</documentTemplateLibraryName>
4   <masterLabel>DocGen</masterLabel>
5</DocumentGenerationSetting>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2021/10/metadata">
3    <types>
4        <members>DocumentGeneration</members>
5        <name>Settings</name>
6    </types>
7    <version>53.0</version>
8</Package>

Wildcard Support in the Manifest File 

This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.