Hello Team,
I'm working on creating a CMTD on Account Plans so we can show all the Account/Contact Relationships that exists for the Account that the plan is for. Based on Documentation I tried to take the AccountId since I don't want to pass the Id for Account Plan, but this just showed an error. Does anyone know how I can add the CMTD on the AccountPlan Page and Pass the Account ID so that I can use this to pull in the data I need? Thanks! These are what I have tried.
Parent Id = Id and AccountId
Object API Name = Account_Contact_Relationship__c
Parent Field in Child Object = Account__c (this is the account look field on the Account Contact Relationship object used in the Object API)
1. Understand what Parent Id means in your component
- If the component expects a record Id of the current page’s object (AccountPlan), that’s usually what you should pass.
- You cannot pass a different record Id (like the Account Id) unless the component supports it.
2. Use Custom Lookup or Custom Filter in the component to use AccountId from AccountPlan
Use a Related List - Single component with a lookup : If your Account Plan has a lookup to Account (AccountId), you cannot directly filter child records on AccountContactRelationship Account__c with the AccountId from Account Plan — out of the box related list won’t support cross-object filter.
Instead, you can add a related list for AccountContactRelationship on the Account record page or create a custom related list component.