In this recipe, we will develop a Lightning JavaScript Controller using the Salesforce Developer Console. The Lightning JavaScript Controller is a client-side controller that handles events and defines the functions associated with the Lightning Component.
Carry out the following steps to develop a Lightning JavaScript Controller, which is used for event handling and function definition for the Lightning Component, using the Salesforce Developer Console:
- 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:
- In the resulting Developer Console window, open the resource or click on the tab for the Lightning Component
accountSearchBeforeCreate
.cmp
. - Click on
CONTROLLER
(or press Ctrl + Shift + 2), as shown in the following screenshot:
- In the resulting Lightning JavaScript Controller...