10

If I implement flexipage:availableForRecordHome in component, the user will be able to add the component in the record page alone. Now I want the component to appear only in a particular page. For example the component should only be added to CASE page and ACCOUNT page and not any other pages. Is this possible?

1 Answer 1

20

Yes, by using the Design file, you can restrict access to just certain objects. This in the documentation:

<sfdc:object> and <sfdc:objects>

Use these tag sets to restrict your component to one or more objects.

...

Example:

<design:component label="Hello World">
    <design:attribute name="subject" label="Subject" description="Name of the person you want to greet" />
    <design:attribute name="greeting" label="Greeting" />
    <sfdc:objects>
        <sfdc:object>Custom__c</sfdc:object>
        <sfdc:object>Opportunity</sfdc:object>
    </sfdc:objects>
</design:component>
4
  • 7
    I was literally like "I like this question, I'm going to wait for sfdcfox to answer it so I can learn this too." so... thanks :)
    – gNerb
    Commented May 14, 2018 at 15:26
  • +1,Brilliant is this a new feature?
    – RedDevil
    Commented May 14, 2018 at 15:26
  • 1
    I read this feature few years back.. nd forgot.. glad sfdc fox answerd Commented May 14, 2018 at 15:30
  • 3
    @RedDevil It was introduced in Winter '17, so three releases ago (not including Summer '18).
    – sfdcfox
    Commented May 14, 2018 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .