Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
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
          6. CreateObjDocument remote action

          6. CreateObjDocument remote action

          This is a remote action to create a document on objects. Vlocity uses the input parameters set up in Step 5 for the remote action.

          Important
          Important

          This step is required only if you're using Vlocity Web Templates. You can ignore this step for DOCX or PPTX templates.

          Vlocity accesses data in the remote action class in the following ways:

          • The Inputs map: This map contains all the Omniscript data and it may be costly to pass all the data to the remote action.

          • The Options map: This map uses selective key-value pair data. In the Generic Document Generation Omniscript, Vlocity passes required data through the Options map. The Context ID, TemplateID, and useTemplateDRExtract are set on this map.

          Remote Action Class

          The class name is ObjectDocument Service. The Method Name is createObjectDocument.

          The class generates all the document section with its section content in HTML. It is a managed package class and not directly accessible to partners.

          The method "createObjectDocument" uses the following input parameters for generating the document.

          • Template ID: This is a required and case-sensitive key that must always be passed in the Options map.

          • Context ID: This is an optional and case-sensitive key that must always be passed in the Options map.

          • UseTemplateDRExtract:

            When set to Yes, the token values are extracted from the Omnistudio Data Mapper that is associated with the selected Contract Document template.

            When set to No, the token values must be available in Omniscript data and mapped in the selected Contract Document Template Data Mapper. If you select this option, you must map all the tokens in the Data Mapper Mapping of the template that is mapped with the Omniscript data.

            Remote Timeout (ms): By default, the response of the remote call must return in 30 seconds or the call will time out. If you need to set up requests longer to complete, you can configure a longer timeout (up to 120 seconds).

            Remote action in the queue: To run the remote action in the queue, you must first select CreateObjDocument. After that, click "Edit as JSON." Then set the useQueueableApexRemoting as true in the Create Object Document Remote Action. You must add it in two places.

            The CreateObjDocument step in the Omniscript Designer, shown in JSON.
           
          Loading
          Salesforce Help | Article