Open Documentation Menu

Using the class “DocumentDownloadResult”

The class dvelop_docs_dev.DocumentDownloadResult combines the output parameters of a successful download of a DMS document.

Signature
global with sharing class DocumentDownloadResult
Contents
Methods

The class DocumentDownloadResult provides the following methods:

getFilename()

This method returns the name of the original file of the DMS document that was downloaded.

Signature
global String getFilename()
Response

The name of the original file.

getBody()

This method returns the contents of the original file of the DMS document that was downloaded.

Signature
global Blob getBody()
Response

The binary contents of the original file.

Use

The following section shows you some application scenarios depicting the use of the class.

Handling the output of a successful download
dvelop_docs_dev.DocumentDownloadResult downloadResult = documentManager.downloadDocument('XH00014562');
String filename = downloadResult.getFilename();
Blob filebody = downloadResult.getBody();