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
B TulasiB Tulasi 

Anonymous blocks and sosl

Hi All,


1 > What is anonymous Blocks in salesforce
2 > List> searchList = [FIND 'map*' IN ALL FIELDS RETURNING Account (id, name),Contact, Opportunity, Lead];
       in the second line, What is the meaning of map in that query.


. plz give me some simple sentences

Thanks in advance
Thulasi
Chandra Sekhar CH N VChandra Sekhar CH N V
map* is just a string you are using to query using a SOSL query. you basically enclose it inside single quote when using with APEX. In case you are running query or used with SOAP/REST APIs you should enclose with {}. 

 
Chandra Sekhar CH N VChandra Sekhar CH N V
An anonymous block is one that is run using ExecuteAnonymous instead of using a class, Visualforce page, or trigger to execute. You can run an anonymous block from the Debug Log window or directly through the API.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_anonymous_block.htm