You need to sign in to do that
Don't have an account?
Angela 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
This was then be available as an Inline VFP
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>
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
This was then be available as an Inline VFP
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>