Well, your first question asked for related list, hence I thought u have troubles displaying them. Anyways, as fas I know recently viewed records option is there by default. Could you attach a screen shot to and mark it to specify the exact problem.
I am creating custom component which will display the list of contact record. I have quried list views from apex class but unable to fetch the each list view related records.
after you navigate to the record detail page, for displaying related list, you need to add related list to your detail page.
screenshot :
https://success.salesforce.com/answers?id=9063A000000lAUDQA2
And if you want to navigateto/drilldown the rleate dlist, u need to use this code :
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_force_navigateToRelatedList.htm
Hope this helps.
Cheers,Dev
Here I don't want related list. If I select "Recently viewed" in list view then I want to display recently view records using lightning component.
Thank you
Well, your first question asked for related list, hence I thought u have troubles displaying them.
Anyways, as fas I know recently viewed records option is there by default. Could you attach a screen shot to and mark it to specify the exact problem.