You need to sign in to do that
Don't have an account?

i want to usesearch functionality for vf i added method and vf page search bar but its not search proper record by name ?
public pagereference vendorsearch() {
string tempInput ;
tempInput = '%' + searchfpo + '%';
IccMPPFpolst2 = new List < ICCWorkbench__c > ();
// string tempInput = '%' + searchtext + '%';
if (loggedUser.Profile.Name == 'Customer Community Login User') {
con = new ApexPages.StandardSetController(Database.getQueryLocator([select id, name,Organization__c,Supplier_Status__c,PO_Promised_Date__c,Ex_Factory_Date__c from ICCWorkbench__c where Supplier_Status__c = :'Submitted To Supplier '
AND( Organization__r.name LIKE: tempInput OR name LIKE: tempInput) Order by PO_Promised_Date__c ASC
]));
}
//IccMPPFpolst2=con.getRecords();
con.setPageSize(10);
getICCworkbench2();
return null;
vf:
<apex:commandButton value="Search" action="{!vendorsearch}" style="float:right;width:45px;background:#cfeef8;height:25%; margin-right:0%;margin-top:5px;"/> <apex:inputText value="{!searchfpo}" style=" float:right;width:85px;margin-top:5px;"/>
string tempInput ;
tempInput = '%' + searchfpo + '%';
IccMPPFpolst2 = new List < ICCWorkbench__c > ();
// string tempInput = '%' + searchtext + '%';
if (loggedUser.Profile.Name == 'Customer Community Login User') {
con = new ApexPages.StandardSetController(Database.getQueryLocator([select id, name,Organization__c,Supplier_Status__c,PO_Promised_Date__c,Ex_Factory_Date__c from ICCWorkbench__c where Supplier_Status__c = :'Submitted To Supplier '
AND( Organization__r.name LIKE: tempInput OR name LIKE: tempInput) Order by PO_Promised_Date__c ASC
]));
}
//IccMPPFpolst2=con.getRecords();
con.setPageSize(10);
getICCworkbench2();
return null;
vf:
<apex:commandButton value="Search" action="{!vendorsearch}" style="float:right;width:45px;background:#cfeef8;height:25%; margin-right:0%;margin-top:5px;"/> <apex:inputText value="{!searchfpo}" style=" float:right;width:85px;margin-top:5px;"/>