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
InvisiChrisInvisiChris 

Basic Visualforce Question

I'm brand new to Visualforce and coding in general, and am trying to figure out how to filter the record results pouring in to my Visualforce Page from a standard controller pulling opportunity records:

 

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" 

standardController="Opportunity" recordSetVar="screening">

 

I want to only show records based around the value of a field on the opportunity page.

 

Thanks in advance for your help. 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
BeeddiskShahBeeddiskShah

hey InvisiChris,

The functiinality cannot b achieved using standard controller. As you are a newbie I will lay down the steps for you to achieve this.

 

1) Use a controller extension. This will be done by writing a apex class and adding that as a extension on <apex:page> tag.

Please refer VF guide for details.

 

2) Get a variable List<Opportunities> and fetch the records from Database using SOQL.

 

3) Bind that variable with the data table.

 

4) Cheers, U r done.

 

Hope it helps.

All Answers

Sam.arjSam.arj
You will need to use a controller extension and filter the records using SOQL and publish it on your Visualforce page.
InvisiChrisInvisiChris
Forgive my green-ness, but my end goal is to filter out opportunities from my Page that have a close date before February 15 2010. Could you give me an idea of what that could look like?
BeeddiskShahBeeddiskShah

hey InvisiChris,

The functiinality cannot b achieved using standard controller. As you are a newbie I will lay down the steps for you to achieve this.

 

1) Use a controller extension. This will be done by writing a apex class and adding that as a extension on <apex:page> tag.

Please refer VF guide for details.

 

2) Get a variable List<Opportunities> and fetch the records from Database using SOQL.

 

3) Bind that variable with the data table.

 

4) Cheers, U r done.

 

Hope it helps.

This was selected as the best answer