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
KirbyBryanKirbyBryan 

SOSL searching picklists

SOSL does not seem to be able to search picklist fields. Is this correct?

Best Answer chosen by Admin (Salesforce Developers) 
Pradeep_NavatarPradeep_Navatar

The search() call searches most objects (including custom objects) and text fields to which you have access. It does not search the following objects and fields:

 

  • Any elements such as picklists that are defined as not searchable (searchable is false). To determine whether a given object is searchable, your application can invoke the describeSObjects() call on the object and inspect the searchable property in the DescribeSObjectResult.
  • Number, date, or checkbox fields. To search for such information, use the query() call instead.
  • Textarea fields, unless you use the ALL FIELDS search group.
  • Attachment records associated with certain objects, such as Account, Contact, or Opportunity.


Did this answer your question? if so, please mark it solved.

All Answers

hisrinuhisrinu

You can use ALL FIELDS syntax if you want to search all sobject fields but there is nothing specific for picklist fields

Pradeep_NavatarPradeep_Navatar

The search() call searches most objects (including custom objects) and text fields to which you have access. It does not search the following objects and fields:

 

  • Any elements such as picklists that are defined as not searchable (searchable is false). To determine whether a given object is searchable, your application can invoke the describeSObjects() call on the object and inspect the searchable property in the DescribeSObjectResult.
  • Number, date, or checkbox fields. To search for such information, use the query() call instead.
  • Textarea fields, unless you use the ALL FIELDS search group.
  • Attachment records associated with certain objects, such as Account, Contact, or Opportunity.


Did this answer your question? if so, please mark it solved.

This was selected as the best answer
SharathChandraSharathChandra

Hi

I'm using search() on case object for Origin field you have told there will be searchable property but i didnt find any kind of that property on the field "origin" i'm not able to search for the origin which is a picklist field

 

SharathChandraSharathChandra

My Case object "isSearchable" property is true but it is not searching for "Origin" which is a picklist