This API converts an agreement Word document into a specific output format using the parameters, such as agreementId and docFormat. This API is deprecated.
 


API

Signature

convertAgreementWordDoc

webService static Id convertAgreementWordDoc(Id agreementId, Id docId, String docFileName, String docFormat, String pLevel, Boolean addWatermark, Boolean removeWatermark, String agreementNbr, String dateFormat, String sessionId, String serverUrl)
Request Parameters
NameTypeDescriptionRequired?
agreementIdIDThe id of the agreement providing the content for the document.Yes
docIdIDThe id of the agreement document to convert in a different output format.Yes
docFileNameStringThe file name for the Word document.Yes
docFormatStringIndicates whether the document will be:
  • DOC
  • DOCX
  • RTF
Yes
pLevelStringThe 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
addWatermarkBooleanIndicates whether a draft watermark should be added to the output document.Yes
removeWatermarkBooleanIndicates whether a draft watermark on the source word document should be removed from the resulting document.Yes
agreementNbrStringThe agreement number of the document, upserted in the header.Yes
dateFormatStringThe date format for the footer of the document.Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server URL.Yes



Response Parameter
NameTypeDescription
resultIDThe id of the converted document.


Code Sample

ID agreementId = 'a016100000Che3D';
ID docId = 'a0Y61000002K6IR';
String docFileName = 'Agreement';
String docFormat = 'PDF';
String pLevel = 'Full access';
Boolean addWatermark = true;
Boolean removeWatermark = false;
String agreementNbr = '1234';
String dateFormat = 'M/d/yyyy HH:mm:ss';
String sessionId = sessionId; //This is the session Id.
String serverUrl = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
ID ConvertedDocId = Apttus.MergeWebService.convertAgreementWordDoc(agreementId,docId,docFileName,docFormat,pLevel,addWatermark,removeWatermark,agreementNbr,dateFormat,sessionId,serverUrl);
CODE