+ 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
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.