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
Angela Mullen-Smith 29Angela Mullen-Smith 29 

visual force issue

I am trying to show related meetings in an Inline Visualforce Page. 
It was working but seems to have gone weird 

Basically, I am looking to display on a Custom object the last 2 meetings on a Customer Account

ie Customer has 2 meetings

User-added image


This was then be available as an Inline VFP
User-added image
As you can see - the 2 meetings displayed are totally different from the Customer meetings, plus the name is shown. In fact tey have become Static - in that every record shows the same 2 meetings

Just not sure what I have done wrong

Apex
Public without sharing class EventController {


public List <Event> EventList{get;set;}
Public EventController(ApexPages.StandardController stdController){
FMR__c FMR = (fmr__c)stdController.getRecord();

this.Eventlist= [SELECT Id, Type, Subject, StartDateTime, WhatID,whoid,
    (SELECT Relation.Name FROM EventRelations where Relation.Type='Contact' and IsParent = True)
   FROM Event 
   WHERE ((IsDeleted = False) and (Type= 'Meeting')  and (CreatedDate = LAST_N_DAYS:365) and (ActivityDate = LAST_N_DAYS:365) and 
   WhatID =:FMR.Accountid__c)
        OR
        ((IsDeleted = False)  and (Type= 'Meeting')  and (ActivityDate >= TODAY))
         
        order by StartDateTime desc limit 2 ];
        }
}

Visualforce Page

<apex:page StandardController="FMR__c"  extensions="EventController">
    <apex:pageBlock title="Related Meetings List">
        
        <!-- Meeting List -->
        <apex:pageBlockTable value="{!Eventlist}" var="Event">
            <apex:column value="{! Event.Type }"/>
            <apex:column value="{! Event.Subject }"/>
            <apex:column value="{! Event.StartDateTime }"/>
            <apex:column value="{! Event.whoId}"/> 
            <apex:outputText value="{!FMR__c.AccountID__c}" rendered="false"/>
            <apex:pageblocktable value="{!Event.EventRelations}" var="er">
            <apex:column value="{! er.Relation.Name }"/>
            <apex:outputfield value="{!er.Relation.Name}"/>
            </apex:pageBlockTable>
        </apex:pageBlockTable>
        
    </apex:pageBlock>
</apex:page>