Skip to main content
AKHILESH THAKUR ha fatto una domanda in #Apex
Hi everyone ..... i am trying to execute a code ..... but i am receiveing an error :  Syntax error. Found '.'

public with sharing class CustomSearchController {

public string inputValue  {get;set;}

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

public List<contact> ContactList {get;set;}

public List<Opportunity> OpportunityList {get;set;}

public CustomSearchController() {}

public void dosearch(){

 

string s = '%'+inputValue+'%'; 

AccountList = [SELECT Id, Name, AccountNumber From Account Where Name LIKE: s];

ContactList = [SELECT Id, Title, Department FROM Contact Where Name LIKE: s];

OpportunityList = [Select Id, Name, Type FROM Opportunity Where Name LIKE: s];

  

 // return null;

  

  

 //   public PageReference dosearch() {

    //    return null;

    }

}

Thanks in advance 
1 risposta
  1. 8 set 2016, 07:25
    Hi Akhilesh,

    The above Apex Class seems to be perfect. I can able to save it in my Dev org without any error.

    Hi Akhilesh,The above Apex Class seems to be perfect. I can able to save it in my Dev org without any error.Please double check it and let us know in which line you are getting Error.

    Please double check it and let us know  in which line you are getting Error.

    Best Regards,

    BALAJI
0/9000