Dev: Flow Download Button
## Available Screen Components
The extension introduces four specific Lightning Web Components that can be added to any Flow screen:
- Download Docx Button: For generating Microsoft Word documents.
- Download PDF Button: For generating PDF files.
- Download PPTx Button: For generating PowerPoint presentations.
- Download Xlsx Button: For generating Excel spreadsheets.
## Implementation Workflow
The implementation process follows a specific sequence of logic and screen elements within the Flow Builder:
1. Data Retrieval
- Get Object Api Name: The process begins by using a DRTE Extension Managed Action (Apex Action) to identify the relevant Object API name.
- Get Doc Templates: A "Get Records" element is used to retrieve the necessary document templates.
2. User Selection
- Show Data Table: A screen element ("Screen1") presents a Data Table to the user, allowing them to select the desired template for their document.
3. Document Generation
- Generate HTML: An Apex Action takes the selected template and data to generate the HTML content required for the document.
4. Final Download
- Download Screen: The final screen ("Screen2") utilizes the generated HTML to enable the download buttons.
- User Interaction: The screen displays a message confirming the document has been generated and prompts the user to click the download button to begin the process.
## Developer Note
The extension is designed to handle "larger files," noting that the download process may take a few moments to complete once the user initiates it from the screen.