2

In Lightning is there an analog to apex:relatedlist??

I'd like to build a custom component, visible in App builder, that simply displays a lightning designed related-list for a select related object.

With visualforce you could simply call

<apex:relatedList list="Opportunities" />

I tried accomplishing this via a visualforce page and the visualforce standard lightning component but I don't get the lightning design.

1

There is no lightning component that can only pull related list at this point .

Recommend using the SLDS design system and use Tabs ,Datatables and Related List Header to build your own custom component

https://www.lightningdesignsystem.com/components/page-headers/#flavor-related-list

https://www.lightningdesignsystem.com/components/tabs/

-1

You may use below code. Might it suits your requirement.

<apex:page standardController="Program__c" docType="html-5.0" sidebar="false showheader="false" standardStylesheets="false">

<script>
window.onload = function() {
   sforce.one.navigateToRelatedList('Goals__r', '{!Program__c.id}');
}
</script>

</apex:page>

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.