You need to sign in to do that
Don't have an account?
Zoe Fan
Related Record List Component on Community - What is Parent Record ID
Hi there,
I am trying to add a "Related Record List" Component in my Community on my custom object (called Payment Profiles) details page. I want to display a related list from the related look-up field. In this case, the related field is "Counterpart__c" The component requires "Parent Record ID" and the Related List Name.
I've tried:
{!Counterpart__c}
{!Counterpart__c.Id}
{!Counterpart__r}
{!Counterpart__r.Id}
{!recordId.Counterpart__c}
{!recordId.Counterpart__c.Id}
{!recordId.Counterpart__r}
{!recordId.Counterpart__r.Id}
Granted I haven't published and tested each of these options, I am just relying on the preview in the community builder which says "This component has no data". Can you let me know what the syntax was for determining the ID of a parent record?
Thanks,
Zoe
I am trying to add a "Related Record List" Component in my Community on my custom object (called Payment Profiles) details page. I want to display a related list from the related look-up field. In this case, the related field is "Counterpart__c" The component requires "Parent Record ID" and the Related List Name.
I've tried:
{!Counterpart__c}
{!Counterpart__c.Id}
{!Counterpart__r}
{!Counterpart__r.Id}
{!recordId.Counterpart__c}
{!recordId.Counterpart__c.Id}
{!recordId.Counterpart__r}
{!recordId.Counterpart__r.Id}
Granted I haven't published and tested each of these options, I am just relying on the preview in the community builder which says "This component has no data". Can you let me know what the syntax was for determining the ID of a parent record?
Thanks,
Zoe
Try the suggestions as mentioned in the below blogs,
https://trailblazers.salesforce.com/answers?id=9063A000000eUA3QAM
https://salesforce.stackexchange.com/questions/278239/trying-to-add-related-record-list-to-community
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.
I have tried to put {!recordId.Counterpart__c} on the Parent Record ID but still the component cannot generate any data.
On Lightning, I was able to add the related list component by selecting "Counterpart" on the Parent Record field. I just wanted to show the same compenent / content in the community by entering the correct Parent ID (Since it is not allowed to search on the field on the above community component)
Keep in mind that the Financial Highligts is related object under account, not the payment profile. The payment profile is a custom object with an account lookup field called "Counterpart".
Therefore, the component "Related List - Single" would not work as the Financial Highlights object is not directly related to payemnt profile objects.
Would be much appreciated if you can give me an example of what should be entered into the "Parent ID" field for standard use on this "Related Record List" standard component.
The other issue above is that it may not display if there are no related records as seen in the error image above.
I tried this and it doesn't work in my Sandbox.
Parent Record ID = {!recordId}
Related List Name = Cases
But "This component has no data" i get. What did i do wrong?
Shouldn't be so hard to get a list view of the records from the account or?
For the record, the Cases Related List is on the partner view layout. I also logged in as someone with active Cases to make sure it wasn't showing this error message only if they had no Cases. Does anyone have any thoughts as to why this might be happening?
I don't think it is supposed to show any data. Since you're in Builder, it was looking for a specific record Id. In builder, if you want to view how it will work while still in Builder, enter a specific record Id (1000iESdcxsuAAK) under Parent Id and the Related Record Name (Relarionship__r), but you should publish it still with {!recordId} and {!relationshipApiName}.
In the case of the AccountContactRelation junction object, there are two related lists, the first is AccountContactRelations, which appears as a related list on Accounts.The second is the AccountContactRelations which appears as a related list on the Contacts.
Note that when you are making your own junction objects, there is no rule that says that both related lists have to have the same API name, in fact, I find it somewhat confusing. But there you go....