Carry out the following steps to create a custom Help for this Page option on an opportunity record using a Lightning Component, Lightning Action, and a PDF document:
- Click on the Setup gear icon, as shown in the following screenshot:
The Setup gear icon is located in the top right-hand area of the main Home page.
- Click the Developer Console option, as shown in the following screenshot:
We will be presented with the Developer Console window.
- Click on File.
- Click on New.
- Click on Lightning Component, as shown in the following screenshot:
We will be presented with a New Lightning Bundle dialog.
- Enter OpportunityHelp in the Name field.
- Optionally, enter a value in the Description field.
- Click on Submit, as shown in the following screenshot:
- In the resulting component page, paste the following code:
<aura:component implements="force:lightningQuickAction"> <a href="{!$Resource.HelpText}" target="_blank">
Help for This Page (New Window)
</a> <iframe width="100%" height="400px;" style="border: 1px solid"
src="{!$Resource.HelpText}" /> </aura:component>
- Click on File.
- Click on Save, as shown in the following screenshot:
We will now configure a Lightning Action that references the component.
- Click on the Setup gear icon, as shown in the following screenshot:
The Setup gear icon is located in the top right-hand area of the main Home page.
- Click the Setup option, as shown in the following screenshot:
- Navigate to the Opportunity customization setup page, by clicking the following: Objects and Fields | Object Manager | Opportunity | Buttons, Links, and Actions.
Locate the Buttons, Links, and Actions section on the right of the page.
- Click on New Action.
We will be presented with the Opportunity Actions - New Action page.
- Select Lightning Component for the Action Type.
We will be presented with the Lightning Component selection.
- Select c:OpportunityHelp from the Lightning Component selection.
- Enter 500px in the Height textbox.
- Enter Help for this Page in the Label textbox.
- Optionally, enter a value in the Description textbox.
- Click on Save, as shown in the following screenshot:
We will now modify an opportunity page layout to add the Help for this Page Lightning Action to the opportunity record page:
- Click on the Setup gear icon, as shown in the following screenshot:
The Setup gear icon is located in the top right-hand area of the main Home page.
- Click the Setup option.
- Navigate to the Opportunity customization setup page, by clicking the following: Objects and Fields | Object Manager | Opportunity | Page Layouts.
- Select the required page layout by clicking on the page layout name from within the list of available page layouts, as shown in the following screenshot:
- Override the predefined Actions in the Salesforce Mobile and Lightning Experience Actions section by clicking on override the predefined actions, as shown in the following screenshot:
- Drag the Help for this Page Lightning Action to the Actions section on the page layout, as shown in the following screenshot:
- Finally, click on Save.