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:

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...