Embedded Help
Deployment Examples
Control Components Via Events
fire lightning events from your own code to dynamically control help components (like making a topic viewer navigate to a specific topic) improved help includes a number of packaged lightning ‘events’ that can be fired by external code and/or components these events can be used to control help components in a number of ways example scenario create a local lightning component that is able to fire messages to trigger action in improved help components on the same page layout in this instance, we will cause an improved help topic viewer to navigate to a specified help topic markup \<aura\ component implements="force\ apphostable,flexipage\ availableforallpagetypes"> \<! title text for the component > \<div style="text align center; font size 1 5rem; width 100px"> local help cue \</div> \<! a ‘button’ wired to a click event to fire a help cueing message > \<div onclick="{!c cuehelp}" style="cursor pointer; text align center; width 100px; margin auto; border solid 1px #ccc; border radius 0 3rem; padding 1rem; background #eee;"> cue\</div> help \</aura\ component> controller ({ // the function called when the help cueing ‘button’ div is clicked cuehelp function(component, event, helper) { // create an improved help ‘select topic’ event var appevent = $a get("e iahelp\ selecttopic"); // provide details (the record id) of the help topic to be selected appevent setparams({"recordid" 'your help topic record id here'}); // specify the name (component id) of the sender, so improved help // components can be set to listen for these messages (by setting their // ‘listens to’ design parameter) appevent setparams({"sourcecomponent" 'localcomponent'}); // send the message by firing the event appevent fire(); }, }) test page setup add the locally created component to any desired lightning page layout; add an improved help topic viewer to the same page; the topic viewer’s default help topic may be specified or left blank as desired; ensure that the component id specified in the ‘recordid’ parameter of the ‘selecttopic’ event fired by clicking the cue help div / button is included in the comma separated list of those to which the topic viewer should ‘listen’ result the designated help topic is loaded into the improved help component when the locally defined component issues a message (as its button is clicked) add components directly to page layouts add components directly to lightning page layouts improved help components can be added to page layouts anywhere where salesforce allows this in addition, certain components can be added to the utility bar, making them available across a particular application