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
          Convert Client-Side Documents into PDF Files

          Convert Client-Side Documents into PDF Files

          The fndmultiPDFConvertLwc Omniscript converts a generated Microsoft Word (.docx) or Microsoft PowerPoint (.pptx) document into a .pdf file. This Omniscript can convert one or more documents simultaneously into .pdf format.

          To make the Omniscript easily available to your sales reps, create a custom button. For more information, see Create a Custom Generate Document Button

          Using the fndmultiPDFConvertLwc Omniscript

          Here's an example workflow for how a sales rep might use this Omniscript.

          1. Enter Object Id

            Enter the object ID, such as a contract ID.

            ObjectId: ID of the Salesforce Object from which the system retrieves data for the document.

            In this window enter the ID of the Salesforce Object from which you want to retrieve data for the document.
          2. Generation Options

            Either use the default values or select different values to download, attach, generate the document, and generate the .pdf file. If you want the fields to be blank, select the --clear-- option.

            Document Title: Create different document titles for the .docx or .pptx documents that you want to generate by using commas to separate the document titles. Document Title is a mandatory field in Document Generation 2.0.

            Docx Content Version Ids: ID of a previously generated .docx or .pptx document that you want to convert into a .pdf format. Use commas to separate the Content Version IDs. You can obtain the content version Ids from the Developer Console. For more information, see Search for Docx Content Version IDs from Developer Console.

            In the Generation Options window, you ​can select values to download, attach, generate the document.
          3. Generate Document

            The Omniscript generates the document, and you can download the document according to your generation options.

            The Generate Document display the generated document, and you can download the document from this window.

          Step Properties for the fndmultiPDFConvertLwc Omniscript

          The fndmultiPDFConvertLwc Omniscript contains steps that 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 fndmultiPDFConvertLwc Omniscript.

          Use this information to modify the Omniscript to meet your specific needs. To see an example of a modified document generation Omniscript, refer to Customize the fndSingleDocxLwc Omniscript

          Omniscript Step

          Properties

          Script Configuration

          These fields are preset.

          • Type: docGenerationSample

          • SubType: fndMultiPDFConvertLwc

          EnterDetails

          objectId : Salesforce Object ID that the system assigns to contextID later in the Set Values step.

          GenerationOptions

          Selects the values for generation options as shown here:

          • DownloadFileFormat : Document type for download: PDF (default) or None.

          • AttachFileFormat : Document type for attachment: PDF (default) or None.

          • DocumentViewer : Preview format: ClientSideViewer (default) or None. A value of None indicates that you can't preview the document.

          • DocumentTitle : Titles for the generated documents. Document Title overwrites the file name and system shows the title in the document preview. This field is mandatory.

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

          • docxContentVersionIds : Document IDs for the .docx or .pptx documents that you want to convert into .pdf. Use commas to separate the Content Version IDs. You can obtain the content version IDs from the Developer Console. For more information, see Search for Docx Content Version IDs from Developer Console.

          Set Generation Options

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

          This step selects the attachFileFormat, contextId, documentTitle, documentViewer, docxContentVersionIds, downloadFileFormat, and pdfGenerationSource values that you want to pass to the Generate Document step.

          Generate Document

          The generation step uses the clmOsMultiPdfDocumentConverter LWC component to generate and show the document.

          This step generates the .pdf document with the option of downloading the generated document.

           
          Loading
          Salesforce Help | Article