I am getting the below error while trying to navigate to a related list.


Unfortunately, the related list you're trying to view isn't in the layout. Please get in touch with your administrator.

But the related list is on the page layout. Can anyone help me please.

displayDetails: function(component, event, helper) {
    var ctarget = event.currentTarget;
    var id_str = ctarget.dataset.value;
    //id_str='cusObject__r';==> related list object name
    var relatedListEvent = $A.get("e.force:navigateToRelatedList");
        "relatedListId": id_str,
        "parentRecordId": component.get("v.recordId")

Related List

  • what is the actual related list id? are you sure it is correct? try hard-coding it – Itai Shmida Jun 19 '18 at 12:56
  • I have seen related lists are getting loaded later once the detail page is loaded in lightning. Try finding the related list once the entire page load is completed. – george thomas Jul 4 '18 at 11:09

Your Answer

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

Browse other questions tagged or ask your own question.