0

Is it possible to reference a standard Lightning page component in a Lightning Web Component? And if so, how is this done? I have not been able to find any documentation on this subject.

(I am specifically wanting to reference the "Related Record" component in an LWC)

1
  • You can't even do that in an Aura component Mar 27 '20 at 16:17
2

The only components you are able to use within an LWC are your own or those specified in the components library. It is not possible to embed components such as the "Related Record" one into your LWC.

However, what you could consider is splitting your LWC component into two or more smaller components that you place into the Lightning Record Page in a layout that makes it look like the related records list(s) are embedded within a larger component (e.g. having your component provide a "header" above and a "footer" below the related records list(s)).

An alternative is to consider writing your own related records component that looks similar to the OOTB one using the SLDS blueprints (such as Data Table).

1
  • Thanks @PhilW. My hope was that I could make a more admin-friendly lwc by using the "Related Record" component, so making a "Related Record-like" component wouldn't help me. Either way, good to know this option isn't viable.
    – Jwok
    Mar 27 '20 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.