Agenda
Using the blogs functionality we would be more clear about how we use Lightning Web Component over different places in Salesforce and how we can make it available.
What we are going to do.
So basically, I am writing this blog to give you an overview of where we can use Lightning Web Components in our Salesforce Org and outside the Salesforce Org and how we can display the name of the Component different from its original name.
Lightning Web Component
First of all, What is the lightning web component?
So, The Lightning Web Components is lightweight and delivers exceptional performance. Most of the code you write is standard JavaScript and HTML.
The Lightning Web Component is not just limited to Lighting Record or Home Page.
We can use it at many places in the Salesforce org or outside the org. And to exposed the Lightning Web Component we first need to set the isExposed functionality of the Component present in the meta.xml file to true:
<isExposed>true</isExposed>
And to make it visible at the desired place we have to set the targets same in the meta.xml file:
<targets>
<target>lightning__FlowScreen</target>
</targets>
We can use a lightning web component at many places like:
Lightning Record Page.
Lightning Home Page
Lightning App Page
Flows
Utility Bar
Comunity Page
Standalone Apps
VisualForce Page
Outlook
Gmail
Custom Tabs
App Exchange etc.
By Setting the targets fields inside the meta.xml files.
Master Label:
Many times a situation comes when we can’t display the original name of the component and we need to show some other name of the component to expose it.
At that time, we use Master Label.
Master Label sets the label of the component as per our requirement which is visible to the end-user and without exposing the API name of the component.
<masterLabel>Best Component Ever</masterLabel>
Description:
We can also set the description of the component using the meta.xml file :
<description>This is a demo component.</description>


Comments
Post a Comment