+ Start a Discussion
leduc datleduc dat 

How to get relatedlistId for custom object?

I want to show a related list view of the Student__c custom object which has Student__c.className__c = Class__c.id from the Class__c custom object, but the related list not showing up and i got this error : "Unfortunately, the related list you're trying to view isn't in the layout. Please get in touch with your administrator." Please help me or let me know what i was wrong. Any help will be appreciated.
var relatedListEvent = $A.get("e.force:navigateToRelatedList");
        "relatedListId": "Student__c.className__c",
        "parentRecordId": component.get("v.recordId") //recordId = Class__c.id 

ShivankurShivankur (Salesforce Developers) 
Hi Leduc,

Please check out this help article (https://help.salesforce.com/articleView?id=000320285&type=1&mode=1) and the details about this error

Hopefully, you will be able to resolve this with it.

Please don't forget to mark as Best Answer so that it can help others in the future.