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
AlexYAlexY 

CampaignMembers is not a valid child relationship name for entity Campaign

I'm a VF newbie trying to create a very simple VF  page and am having trouble trying to display the Campaign Members related list on my page, constantly encountering the following error:

 

'CampaignMembers' is not a valid child relationship name for entity Campaign

 

My code so far:

 

<apex:page standardcontroller="Campaign">

<apex:form >

<apex:pageBlock title="Mass SMS Notification" >
 
                        <apex:pageBlockSection title="SMS Details" columns="1">
                                <apex:outputField value="{!Campaign.Name}"/>
                                <apex:outputField value="{!Campaign.StartDate}"/>
                                <apex:outputField value="{!Campaign.EndDate}"/>
                                <apex:outputField value="{!Campaign.Type}"/>
                                <apex:outputField value="{!Campaign.IsActive}"/>
                                <apex:outputField value="{!Campaign.Status}"/>
                                <apex:outputfield value="{!Campaign.SMS_Message_Text__c}"/>
                        </apex:pageBlockSection>
                         
                    
</apex:pageBlock>

</apex:form>

<apex:relatedlist list="CampaignMembers"/>

 

I have tried numerous variations of Campaign Member with no success.

 

The related list is on my standard page layout

 

Any help would be most appreciated

 

Thanks in advance