I am trying to create lightning component which should be specific to one custom object record only.

I added the component to Community Builder Custom object detail page. The problem I am facing is this component is coming up for all record detail pages like Account, Contact, Other Custom objects etc.

I tried using force:hasRecordId interface as well but it just for passing the record id. How can I restrict the Lightning component for specific Custom Object detail page only?

1 Answer 1


You can use Page Manager and build your own page in Napili Template .

You can pull of the Standard Detail Page components and your custom components there and expose that as a Tab .

  • I thought about it, but my scenario is - I have a Napili tab which goes to list view of the object and from there user can click on any of the records to go to the detail page and on that detail page I have added my Custom component. If my tab was opening the record page directly then I think your approach will be most suitable
    – SEuser
    Jun 24, 2016 at 14:56
  • as a last option I am thinking to hide the component on load if the current page is the Custom object page I want, but I am hoping for some standard approach
    – SEuser
    Jun 24, 2016 at 14:57
  • Sorry missed the scenario that you want to invoke that from another list .How about creating a formula field and exposing that instead in list view that points to this page .This sounds like ability to override a view type of scenario for Napili .Raise this as an idea !!! Jun 24, 2016 at 15:04
  • Good Idea, but client is very specific on the fields that needs to be present on on the community list view. And they want ability to keep on changing the admin config from their side to change these values. I will raise an idea
    – SEuser
    Jun 24, 2016 at 15:06

You must log in to answer this question.

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