Work with Custom Lightning Components
Creating a custom Lightning component requires programming skills. Or, you can install an existing Lightning component from the AppExchange.
To learn how to create a custom Lightning component, see the Lightning Components module.
Custom components in your org that are configured for use in the Lightning App Builder appear in the Lightning Components pane.
- Configure the component and its component bundle so that they’re compatible with the Lightning App Builder and Lightning pages. For details, see the Lightning Components Developer’s Guide.
- Deploy My Domain in your org.
The custom component we’re providing for this module has already been configured for the Lightning App Builder.
In your production org, My Domain lets you create a subdomain unique to your organization. With My Domain, you replace the instance URL that Salesforce assigns you, such as https://na17.lightning.force.com, with your chosen subdomain, for example, https://mydomainname.lightning.force.com.
My Domain is required to create custom Lightning components and set up single sign-on (SSO) in an org. To learn more about My Domain, check out this knowledge article. To learn how to activate it in your production org, see the User Authentication module.
We’ve provided a custom Opportunity Alert Lightning component that you can add to your Lightning page. Let’s install it into your org.
- Copy and paste https://login.salesforce.com/packaging/installPackage.apexp?p0=04tj0000001mMYP into the navigation bar of your browser, and then press ENTER.
The installation takes a few moments.
- Click Done.
After the installation completes, it’s time to add the component to your page.
- From Setup, enter App Builder into the Quick Find box, and then click Lightning App Builder.
- Click Edit next to the Top Accounts and Opportunities page.
- Add the OpportunityAlert component above the List View component.
In the properties pane, change Days Since Last Modified to
Did you notice that the text inside the component changed to match the new field value?
All right! The changes you made are immediately available in Lightning Experience and the mobile app. Let’s see what the page looks like now.
- Open the app on your mobile device.
- If necessary, log in using your Trailhead Playground credentials.
Go to the Top Accounts and Opportunities page.
Go back to your org and view the Top Accounts and Opportunities page in
Because you created the page using the Two Columns template, it uses the two-column format when you view it on the desktop or a tablet.
You’ve got the skills now to make the Salesforce mobile app and Lightning Experience handier and more powerful for your users. Go forth and customize!