Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

download

Converting a Word Document into a given output format for Standard Object (Deprecated)

For any standard object, this API converts a generated Word document into a specific output format, specified in docFormat using the parameters, such as, docId, docFileName. This API is deprecated.

API

Signature

convertWordDoc

webService static Id convertWordDoc(Id docId, String docFileName, String docFormat, Id sObjectId, String pLevel, Boolean addWatermark, Boolean removeWatermark, String headerText, String footerText, String sessionId, String serverUrl)

Request Parameters

Name

Type

Description

Required?

docId

ID

The id of the agreement document to be converted in a different output format.

Yes

docFileName

String

The file name for the Word document.

Yes

docFormat

String

Indicates whether the document will be:
  • DOC
  • DOCX
  • RTF

Yes

sObjectId

ID

The sObject id for which you want to update the document.

Yes

pLevel

String

The protection level to apply to the document. Valid values are:
  • Full access
  • Insert comments only
  • Insert comments and tracked changes only
  • Read only
  • Fill in form fields only

Yes

addWatermark

Boolean

Indicates whether a draft watermark should be added to the output document.

Yes

removeWatermark

Boolean

Indicates whether a draft watermark on the source word document should be removed from the resulting document.

Yes

headerText

String

The header text to be appended to the document.

Yes

footerText

String

The footer text to be appended to the document.

Yes

sessionId

String

The Salesforce session id.

Yes

serverUrl

String

The Salesforce server URL.

Yes

Response Parameter

Name

Type

Description

result

ID

The id of the converted document.

Code Sample

ID docId = 'a0Y61000002K6IR'; String docFileName = 'Agreement'; String docFormat = 'PDF'; ID sObjectId = '0016100000KvBHi'; String pLevel = 'Full access'; Boolean addWatermark = true; Boolean removeWatermark = false; String headerText = 'Agreement Id: 0123456789'; String footerText = 'Date Created: 11/27/2018 7:23:15 PM'; String sessionId = sessionId; //This is the session Id. String serverUrl = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId(); ID ConvertedDocId= Apttus.MergeSupport.convertWordDoc(docId,docFileName,docFormat,sObjectId,pLevel,addWatermark,removeWatermark,headerText,footerText,sessionId,serverUrl) ;