Salesforce - A simple Help system using Lightning Web Components LWC
A simple Help system using Lightning Web Components LWC
There are ways to offer custom help to your users in the standar, like, for instance, Help & Training (where you can add links to documents). See Customize the Help Menu in Lightning Experience.
Or the In-App Guidance, where you can create Prompts and Walkthroughs that will show help, but very limited and only a few times (you can have only a few by default, unless you pay to have more).
Or you can pay for your own Trailhead with myTrailhead.
For the first two, you are already paying with your licenses, but most of the time are not enough to keep the documentation of your system.
A "help system" should have an index (table of content), and open the specific section/document from it (see the Salesforce Help system, for example, clicking on the previous links). This is the main objetive of my solution here.
myTrailhead is the best standard option, but it cost. Then ...
How can we have a simple and low cost custom help system where we will show documents created by our company?
To solve the problem, I wrote these Lightning Web Components to use one File Library as the base of the help system and to ease the navigation of the documents. It is a simple but powerful solution.
To open the Help system we will add it as an Utility Bar item, in the bottom left corner.
The Lightning Web Components
I'm leaving the whole code here in my personal Google Drive (should you have problems downloading it, don't hesitate to contact me).
- myFolderTreeView: the main component that you can add as an Utility Bar item.
- myFolderTreeItem: each entry in the folder tree.
- myIllustration: the standar SLDS illustration we can see when nothing is selected.
- My_FolderTreeView_Controller: the Apex controller.
- FolderTreeItemClick: is the Lightning Message Channel used to communicate between the Folder Tree View and the Items.
When you add the Tree View as an Utility Bar item, try to use this configuration first. Then, you can play with the dimensions to suite your needs.
The basic File Library structure we must have
In Files, Libraries, we must create one library with a folder
- Library: any name can be used.
- Folder: the name of this folder is the one used in the configuration of the Utility Bar, parameter Root Folder Name (see the image above).
- And below this folder you can have any number of subfolders and documents.
What document type can we see?
By default, with a browser like Google Chrome, and with a tricky Salesforce setting, we can see only PDFs. Then, upload PDF files to your Help folder structure, and ...
In Salesforce Setup, go to Security/File Upload and Download Security and set the .pdf option as Execute in Browser.
But ... what about Word, Excel and PPT documents?
For the LWC Help solution to show (and not download) Office documents, you should install the Chrome extension Office Editing for Docs, Sheets & Slides.
And in Setup/Security/File Upload and Download Security, set all the options for Word, Excel and PPT extensions to Execute in Browser.
Wrap Up
As I said before, this is a powerful yet simple solution that allow us to start using the Salesforce project documentation since day one. And add other specific business documents to the system, so the users can find them easily. Enjoy ๐!
Challenge: if you pay attention, you will see that these LWC components can be used to show and select Email Templates from any Salesforce page layout, try to figure it out ๐!!
Comments
Post a Comment