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
Edwin HerreraEdwin Herrera 

Search for all records

I created a search method called search_now that is used to search for the matching ID inputted into the search box. The code is below.

 public PageReference search_now(){
    results=(List<Work_Item__c>)[FIND:ID IN ALL FIELDS RETURNING Work_Item__c(Work_Item_ID__c, Name,Accountable_IT_leader__c,Percent_Complete__c,LSEF_Stage_del__c)][0];
    return null;
    }

I want to be able to leave the input field blank and when I search it would populate all the records in that object. What code would I insert to make that possible? 
sushant sussushant sus
please refere this link 

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_sosl.htm