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
Vikram Singh 157Vikram Singh 157 

Hello ! i have learning VF pages and i have an question like how we can show prospect and customer direct picklist values on vf page

when we click on prospect and click on save it will display only prospect account records and same for customer direct. Can we achive it by statndard controller ?
My code is :
<apex:page controller="Test2Class" >
    <apex:pageBlock >
        <apex:pageBlockTable value="{!showList}" id="accountId" var="a1">
            <apex:column headerValue="Account Name" value="{!a1.Name}"/>
            <apex:column headerValue="Account Type" value="{!a1.Type}"/>
Custom controller class:-
public class Test2Class{

 public list<account> showList = new list<account>([select Id, Name, Type from Account where type='Prospect' and 'customer direct']);
    Public list<account> getshowList(){
        return showList;