+ Start a Discussion
Rakesh SRakesh S 

Display one object ActivityHistories(child) in another object(parent)

Hi All,

I have two objects like Patient1__c(Parent) and Patient2__c(child) and Master-Detail relationship b/w them.
Now i want to diplay ActivityHistories of Patient2__c in Patient1__c object related list. Patient1__c detail page is custom page.
I written a page for ActivityHistories of Patient2__c and that i want to put it in Patient1__c detail page. Trying to use <apex:include > component. but showing some error like " Id value a021a000002wbSa is not valid for the Patient2__c standard controller ".

page for ActivityHistories : 
<apex:page standardController="Patient2__c"> <apex:relatedList list="ActivityHistories" title="Communication History" id="ch"/> </apex:page>

page for Patient1 view:
 <apex:page standardController="Patient1__c"> 
<apex:include pageName="myPage"/>

I need solution without using of apex class. Please help me.

Thank you.
Pradeep Kumar L.GPradeep Kumar L.G
This type of implementation will not work.
1. You are trying to get activity history form child object, each parent can have multiple child record and each child record can have multiple activity history.
2. 1st of all you should get all child records and corresponding activity history record.
3. You can do with simple page block table and couple of lines of apex code, not complex.

Rakesh SRakesh S

We are using Professional Edition.So there is no classes. This is my requirement. I need to do this.

Please help me any one, how to do this.

Thank you.