Newer Version Available
DocumentGenerationSetting
In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for details.
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
DocumentGenerationSetting components are available in API version 52.0 and later.
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
| Field Name | Field Type | Description |
|---|---|---|
| documentTemplateLibraryName | string | Required. The name of the library that stores the document templates to which this setting applies. |
| generationMechanism | GenerationMechanism (enumeration of type string) | Specifies how and where a document is generated. Valid values are:
The default is ClientSide. |
| guestAccessNamedCredential | string | Specifies the named credential that lets guest users generate documents. |
| isServerSideDocGenEnabled | boolean | Enables server-side document generation if the prerequisite license is present in the org. |
| masterLabel | string | Required. Specifies a name for the setting, such as DocGen. |
| previewType | PreviewType (enumeration of type string) | Specifies the format of previews of generated documents. Valid values are: The default is PDF. |
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.