function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Apple88Apple88 

Invalid Child Relationship Name

I created a custom object named as "Currency__c" and set on the option of track field history for this object. Then I want to build a detail page for this object with the related list of Currency History displayed on a separate tab.

 

According to Force.com documentation, Force.com will create an object called Currency__History object automatically when I set on the option of track field history for Currency__C object.

 

Also by checking the schema definition, I found that the child relationship name for Currency__History object is "Histories". Therefore, I put the following coding in the Visualforce page:

 

<apex:relatedList list="Histories" />

 

However, when I execute the Visualforce page, I receive the following error:

 

'Histories' is not a valid child relationship name for entity Currency

 

Would anyone pls help me and indicate what I have done incorrectly?

SFDCDev7SFDCDev7

Hi ,

 

Check this link. http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=17710

 

Hope it helps.

 

-AJ

jeroenjeroen

Hi,

 

The histories as a related list will not work. There has been a number of posts about this. Solve it something like this

 

<apex:pageBlockTable value="{!Currency__c.Histories}" var="h">                <apex:column headerValue="Date"  value="{!h.createddate}"/>                <apex:column headerValue="By"  value="{!h.CreatedById}"/>
		etc. etc. 
                </apex:column> 
            </apex:pageBlockTable>  

(don't know why it is displaying these strange boxes)

 

 

Hope this helps

 

Good luck

Jeroen 

jeroenjeroen

It is showing everything strange, apparently my browser isn't supported or so? (Safari 4.0.3)

 

Sorry

Jeroen