DocumentService

DocumentService class

Provides static methods with which to convert and merge documents using Apex. This method can be used to convert and merge supported file types to a single PDF, or merge Microsoft Office documents of the same type together. Optionally, you can store the resulting document(s) as Content or Attachment files related to the specified parent record.

Tip: Samples available on GitHub. For more information, see DocumentService samples.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

global class DocumentService

The DocumentService class exposes the following members:

Constructors

Member name Description
DocumentService class Creates an instance of the DocumentService class.

Methods

Member name Description
DocumentService.ConvertAndMerge method Initiates the conversion and merging process for the specified list of document, to create a combined document with the specified output file name attached to the specified parent record.
DocumentService.GetConvertAndMergeRedirect method Initiates the conversion and merging process for the specified list of documents, to create a combined document with the specified output file name attached to the specified parent record, and optionally returns a PageReference.

Properties

Member name Description
DocumentService.usePreview property Gets or sets whether to run the DocumentService within the preview environment.

DocumentService constructor

Creates an instance of the DocumentService constructor class.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

DocumentService()

DocumentService properties

The DocumentService class exposes the following members.

Properties

Member name Description
DocumentService.usePreview property Gets or sets whether to run the DocumentService within the preview environment.

DocumentService.usePreview property

Gets or sets whether to run the DocumentService within the preview environment.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

static Boolean usePreview

Property Value

Type: Boolean

true to run the DocumentService within the preview environment; otherwise, false to run the DocumentService within the live environment.

Remarks

If the DocGen Package preview environment is available, either for all organizations or the current organization, set this property to true to execute the static methods included with the DocumentService class within the DocGen Package preview environment. If the DocGen Package preview environment is not available, or if this property is set to false, the static methods included with the DocumentService class run within the DocGen Package live environment.

For more information about the DocGen Package preview environment, see Next release testing.

DocumentService methods

The DocumentService class exposes the following members:

Methods

Member name Description
DocumentService.ConvertAndMerge method Initiates the conversion and merging process for the specified list of documents, to create a combined document with the specified output file name attached to the specified parent record.
DocumentService.GetConvertAndMergeRedirect method Initiates the conversion and merging process for the specified list of documents, to create a combined document with the specified output file name attached to the specified parent record, and optionally returns a PageReference.

DocumentService.ConvertAndMerge method

Initiates the conversion and merging process for the specified list of documents, to create a combined document with the specified output file name attached to the specified parent record.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Overload List

Name Description
DocumentService.ConvertAndMerge(List<Id>, Id, String, Map<String, String>) method Initiates the conversion and merging process for the specified list of documents, to create a combined document with the specified output file name attached to the specified parent record.
DocumentService.ConvertAndMerge(List<Id>, Id, String, Map<String, String>, Map<String, String>) method Initiates the conversion and merging process for the specified list of documents to create a combined document with the specified output file name attached to the specified parent record, and optionally assigns values to specified fields on the created Content or Attachment record(s).

DocumentService.GetApexData method

Note: This API supports the product infrastructure and is not intended to be used directly from your code.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

webService static String GetApexData(String className, String requestInfo)

Parameters

className

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

requestInfo

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

Return value

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

DocumentService.GetEmailTemplateInfo method

Note: This API supports the product infrastructure and is not intended to be used directly from your code.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

webService static String GetEmailTemplateInfo(String emailTemplateIdsAsString)

Parameters

emailTemplateIdsAsString

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

Return value

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

DocumentService.GetSoqlFieldInfo method

Note: This API supports the product infrastructure and is not intended to be used directly from your code.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

webService static String GetSoqlFieldInfo(String ddpId)

Parameters

ddpId

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

Return value

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

DocumentService.GetTrustedDomains method

Note: This API supports the product infrastructure and is not intended to be used directly from your code.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

webService static String GetTrustedDomains()

Return value

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

DocumentService.InitializeOrg method

Note: This API supports the product infrastructure and is not intended to be used directly from your code.

Namespace: LOOP

Package: Nintex DocGen for Salesforce

Syntax

webService static String InitializeOrg(String key)

Parameters

key

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

Return Value

Type: String

This API supports the product infrastructure and is not intended to be used directly from your code.

Related topic

Loop namespace