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
SudhanwaSudhanwa 

Limit search

Hi friends,
 
I m performing a search operation on Account object through the following piece of code:
 
account1 = (List<Account>)[FIND:searchText RETURNING Account(Name,Type,id,BillingCity ...)][0];
 
However, I want my search text to be searched only in Account Name and 2 of my custom fields in the whole account object.
 
So when I enter Billing City or type of account I dont want any results to be shown. Any idea on this?
 
Thanx in advance.
advlgxpmadvlgxpm

I don't think so. There is only a few IN clauses like:

ALL FIELDS

ALL EMAIL FIELDS

ALL PHONE FIELDS

You can see it here in the API Doc and search for IN SearchGroup

http://www.salesforce.com/us/developer/docs/api/index.htm