Loading
Salesforce now sends email only from verified domains. Read More
Omnistudio Document Generation
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
          Step Properties for the fndmultiDocxLwc Omniscript

          Step Properties for the fndmultiDocxLwc Omniscript

          The fndmultiDocxLwc Omniscript contains of steps, which run sequentially when you invoke the Omniscript. Each step has properties that determine the action that the step performs. If you want to change the steps, Salesforce recommends that you either create a version or clone and rename a copy of the fndMultiDocxLwc Omniscript.

          Omniscript Step

          Properties

          Script Configuration

          Fields are preset.

          • Type docGenerationSample
          • SubType fndMultiDocxLwc

          Enter Object

          • objectId Salesforce Object ID of the object on which the document is generated. The ObjectID is used in the SetValues step to set the contextID.
          • templateType Use either a Microsoft Word (.docx) document template or Microsoft PowerPoint (.pptx) document template.

          Get Document Templates

          Retrieves all active .docx or .pptx document templates (JSON Based) by using the DocGenSample-ExtractDocumentTemplatesLWC Omnistudio Data Mapper Interface.

          Pick Template

          Captures multiple IDs of the templates in the DocumentTemplate selectable list by using the clmSelectableItems LWC component.

          Set Values

          Sets the required variables for document generation.

          • selectedTemplate: ID of the document template that's used for document generation.
          • templateType: Microsoft Word (.docx) or Microsoft PowerPoint (.pptx) document template.

          Arrange Selected Template

          Reorders the document templates that you select in the PickTemplate(s) step. It uses the clmOsArrangeSelectedTemplateList LWC component, which uses Javascript to invoke Apex classes. When generating the document, you can select the templates that use their own DR Extract.

          GenerationOptions

          • DownloadFileFormat: Document type for download: All (default), Microsoft Word, Microsoft PowerPoint, PDF, or None.
          • AttachFileFormat: Document type for attachment: Microsoft Word (default), Microsoft PowerPoint, PDF, Word, PDF, PowerPoint, PDF, or None.
          • DocumentViewer: Preview format: PDF (default) or None. A value of None (case-sensitive) indicates that you can't preview the document.
          • DocumentTitle: Optional titles for the generated documents. Document Title overwrites the file name and the system shows the title in the document preview.

            By using commas to separate document titles, you can create different document titles for the .docx or .pptx documents that you generate.

          • DocGenerationMechanism: Read-only and selected as ClientSide. If you customize the Omniscript, you can make the generation options selectable.
          • Insert Space for Repeating Content Tokens: Specifies whether the repeating content token's output is separated with spaces in a generated document.
          • Keep Intermediate: [Optional] Specifies whether intermediate DOCX or PPTX files generated for PDF conversion are retained. When both attachFileFormat and downloadFileFormat are set to pdf, setting keep-intermediate=false triggers the system to delete the intermediate file after conversion, reducing storage usage. Supports singleDocxLwc, singleWebLwc, and multiDocxLwc OmniScripts through the LWCs ClmOsDocxGenerateDocument, ClmOsWebGenerateDocument, and ClmOsMultiDocxGenerateDocument. By default, keep-intermediate is set to true, maintaining existing behavior.
          • documentGenerationFontSource - Specifies the source of the font used for rendering values during document generation. Possible values include Rich Text Editor Font, Document Font. The default value is Rich Text Editor Font. Rich Text Editor Font uses the font defined in the rich text field data, while Document Font uses the font defined in the document template.

          Set Generation Options

          The system maps the values that you defined in the Generation Options step to the corresponding variables.

          The step selects the attachFileFormat, downloadFileFormat, documentViewer, pdfGenerationSource, documentGenerationFontSource, insertSpaceforRepeatingContentTokens, documentTitle, and docGenerationMechanism values that are to be passed to the Generate Document step.

          Generate Document

          Generates the document with the option to send an email with the generated document attached.

          The generation process uses the clmOsMultiDocxGenerateDocument LWC component , which uses JavaScript to invoke Apex classes for document generation.

          GenerateMergeDocument

          Combines multiple .pdf documents into a single .pdf document. The merge process uses the clmOsGeneratePdfMergeDocument LWC component.

           
          Loading
          Salesforce Help | Article