Loading
Vlocity Contract Lifecycle Management
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          getDocuments Method

          getDocuments Method

          This method delegates the task, by default, to the VOI class DefaultDocuSignDocumentSelector that queries from both the ContentVersion and Attachment objects. The class expects an input parameter objectId that refers to the object whose documents are to be fetched.

          However, if you have already defined a custom class implementation setting for DocuSignDocumentSelector, the task is delegated to that class instead.

          Parameters

          Required parameters depend on the implementing class.

          Parameter

          Description

          documentSelector

          This is an optional parameter that specifies which VOI class will be executed. Use this when you want to define a class other than the default class or the one already defined for DocuSignDocumentSelector.

          If the value refers to a class that does not exist, DefaultDocuSignDocumentSelector will be used instead.

          Request Body

          Using default or custom class implementation (if custom class is defined and no documentSelector is submitted)

          // initialize the parameters
          String methodName = 'getDocuments';
          Map<String, Object> inputMap = new Map<String, Object>();
          Map<String, Object> outputMap = new Map<String, Object>();
          Map<String, Object> optionsMap = new Map<String, Object>();
          
          // input parameter expected by "DefaultDocuSignDocumentSelector"
          inputMap.put('objectId', '[object whose documents are to be fetched]');
          
          // will not use, optional parameter
          
          // instantiate the generic api
          VlocityOpenInterface2 voi = new GenericDocuSignIntegrationService();
          
          // invoke the method
          voi.invokeMethod(methodName, inputMap, outputMap, optionsMap);
          
          // log result
          System.debug('outputMap: ' + JSON.serialize(outputMap));

          Using a specific implementation. The getDocuments implementing class can define its own input and optional parameters. In the sample below, the implementing class CustomDocuSignDocumentSelector expects two input parameters param1 and param2, and an optional parameter option1.

          // initialize the parameters
          String methodName = 'getDocuments';
          Map<String, Object> inputMap = new Map<String, Object>();
          Map<String, Object> outputMap = new Map<String, Object>();
          Map<String, Object> optionsMap = new Map<String, Object>();
          
          // specify the input parameters expected by "CustomDocuSignDocumentSelector"
          inputMap.put('param1', [param1 value]);
          inputMap.put('param2', [param2 value]);
          
          // specify custom class to use
          optionsMap.put('documentSelector', 'CustomDocuSignDocumentSelector');
          
          // specify the optional parameters expected by "CustomDocuSignDocumentSelector"
          optionsMap.put('option1', [option1 value]);
          
          // instantiate the generic api
          VlocityOpenInterface2 voi = new GenericDocuSignIntegrationService();
          
          // invoke the method
          voi.invokeMethod(methodName, inputMap, outputMap, optionsMap);
          
          // log result
          System.debug('outputMap: ' + JSON.serialize(outputMap));

          Response Body

          If the method is successfully executed, the response body contains documents, a list of map containing document details.

           
          Loading
          Salesforce Help | Article