Activity Forums Salesforce® Discussions how to display the result of sosl in Salesforce Visualforce page?

  • Vikas Kumar

    February 8, 2017 at 12:45 pm

    Hi gaurav;

    you can do something like this

    <apex:page StandardController="Contact" extensions="tstpopup1">


    <apex:commandButton action="{!runQuery}" value="Go"/>

    <apex:pageBlock >
    <apex:pageBlockSection columns="1">
    <apex:pageBlockTable value="{!accounts}" var="account">
    <apex:column headerValue="Name" value="{!}/>
    <apex:column headerValue="Street" value="{!account.BillingStreet}"/>
    <apex:column headerValue="City" value="{!account.BillingCity}"/>
    <apex:column headerValue="Postcode" value="{!account.BillingPostalCode}"/>




    public with sharing class tstpopup1 {

    public List<Account> accounts {get; set;}

    public tstpopup1(ApexPages.StandardController str){
    accounts=new List<Account>();

    public void runQuery() {
    List<List<Account>> searchResults=[FIND '1234'IN ALL FIELDS RETURNING Account (id, name, billingstreet, billingcity, billingpostalcode)];
    //return null;



Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos