<apex:page standardController="Prospect__c" recordSetVar="Prospects">
<apex:pageBlock title="Loan Prospects List">
<!-- Contacts List -->
<apex:pageBlockTable value="{! Prospects }" var="Pro">
<apex:Column headerValue="Name">
<apex:outputLink value="/{!Pro.Id}">
<apex:outputText value="{!left(Pro.Name,50)}">
</apex:outputText>
</apex:outputLink>
</apex:Column>
<apex:Column value="{! Pro.Property__c}"/>
<apex:Column value="{! Pro.Contact__c.Phone}"/>
<apex:Column value="{! Pro.Contact__C.MobilePhone}"/>
<apex:Column value="{! Pro.Prospect_Score__c}"/>
<apex:Column value="{! Pro.Email__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Hi Bryan,Please find the modified code: Here I considered:
(1) Naming convention.
(2) Used Custom Controller to handle the conditions in the SOQL.
(3) Tested the solution in my DE environment and looks good.
Controller:<apex:page controller="ProspectExtController">
<apex:pageBlock title="Loan Prospects List">
<!-- Contacts List -->
<apex:pageBlockTable value="{!prosList}" var="Pro">
<apex:Column headerValue="Name">
<apex:outputLink value="/{!Pro.Id}">
<apex:outputText value="{!left(Pro.Name,50)}">
</apex:outputText>
</apex:outputLink>
</apex:Column>
<apex:Column value="{! Pro.Property__c}"/>
<apex:Column value="{! Pro.Contact__r.Phone}"/>
<apex:Column value="{! Pro.Contact__r.MobilePhone}"/>
<apex:Column value="{! Pro.Prospect_Score__c}"/>
<apex:Column value="{! Pro.Email__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Please do let me know if it helps you.public class ProspectExtController {
public List<Prospect__c> prosList {get; set;}
public ProspectExtController() {
prosList = [Select Id, Name, Property__c, Contact__c, Contact__r.Phone, Contact__r.MobilePhone,
Prospect_Score__c, Email__c from Prospect__c where CreatedDate = Yesterday];
}
}
Regards,
Mahesh
Hi Mahesh.Thank you for your help, I had gotten around to doing it this way as well and this response verified my efforts. I am now trying to place the results from my visualforce page on to an email, is it possible that I can call my results directly from a visualforce template?