This is the component that can be dropped into the lightning record page. This will inturn open a modal window that will do the actual document generation.
Used by the createDocumentLWC
component. This component constructs a URL and iframes the URL into the modal window. For testing purposes the window is setup to be visible but this can be changed to be a hidden window.
The name of the template is hardcoded in this example and need to be modified. Alternatively the template name can be passed in from createDocumentLWC
as a parameter similar to how the recordId
and objectApiName
are passed to the component.
This is the page S-Docs will redirect to after the document generation is complete. This can be modified to let the user know what to do after generation. You can also enhance this to automatically close the modal window after generation is complete.