Saturday 7 September 2019

How to restrict your component to one or more objects?

Hi ,

We can restrict to our component to one or more objects by using the following:

<sfdc:objects> and <sfdc:object>

Here in the following example we are restricting the component to Opportunity which is using the following design component by using  <sfdc:objects> and <sfdc:object>.


<design:component label="Hello World">
    <design:attribute name="subject" label="Subject"/>
    <design:attribute name="greeting" label="Greeting" />    
    <sfdc:objects>       
        <sfdc:object>Opportunity</sfdc:object>
    </sfdc:objects>
</design:component>

If we define the design component with lightning component as above then it will be available for Opportunity Lightning Record page only.

Reference:

How to include a screen flow in a Lightning Web Component

 Hi, Assume  you have a flow called "Quick Contact Creation" and API Name for the same is "Quick_Contact_Creation". To i...