SOSL the Salesforce Object Search Language syntax. Use this tag for questions related to SOSL and handling query ouput.

learn more… | top users | synonyms

2
votes
0answers
31 views

regEx + search capability in sfdc platform

Looking for suggestions on accomplishing search + regEx in sfdc, to search cases which have occurrence of the phrase 'PROVIDED BY:' in case history and get the case number where this phrase was found ...
1
vote
1answer
42 views

Retrieve data from custom object on Visualforce page

I have created a custom object which contains multiple fields that I want to be able to show on a Visualforce page. From the discussion I've had with another developer it was recommended that I use a ...
2
votes
1answer
23 views

how to add a value from a text box to SOSL querry dynamically?

I have written an sosl querry. for(List<SObject> obj:[FIND **'jose'** IN ALL FIELDS RETURNING Lead(id,name,Company,Phone,Street,City,State,PostalCode,Country,Owner.id WHERE ...
1
vote
2answers
55 views

404 error when making SOSL queries from native mobile applications

I am developing a native android app using the mobile sdk. I am trying to make a search query like this RestRequest req = RestRequest.getRequestForSearch("v20.0", "FIND {"+searchString+"*} IN ALL ...
0
votes
0answers
18 views

Report on opportunities with certain activities?

How would I create a report that showed all opportunities with at least one activity, whose most recent activity was this month, and contained the word "foo"? (I'm a total SFDC novice -- if there are ...
0
votes
1answer
46 views

unexpected response 404 on getRequestForSearch

I am developing a native android app using the mobile sdk. I am trying to make a search query like this RestRequest req = RestRequest.getRequestForSearch("v20.0", "Find '"+searchString+"*' IN ALL ...
2
votes
1answer
49 views

Can SOSL retrieve child objects from the result set of parent objects?

I have contact object and Registration Custom Object. I want to list the registration object fields in contact object using relationship as follows: SELECT id, name, (SELECT id,name FROM ...
3
votes
1answer
30 views

Is there a way to catch the “Search Unavailable” exception that is thrown when doing a SOSL query?

We have a try/catch block around the line doing the query, but we still get this exception mailed to us on some SOSL queries: List<List<SObject>> ret, queryResult; try { ...
0
votes
1answer
116 views

Display list of list on visual force page. Search results of inputtext from all objects using sosl

I am trying to search for a text from all the objects. The method in the controller returns the results as List of List. I am trying to display the results in the visualforce page but no results get ...
2
votes
0answers
34 views

SOSL unusual behaviour

I have faced and have been facing issues using the SOSL query or I may say SOSL query confuses me every time with its result/output. i have encountered situations when the SOSL search query doesn't ...
4
votes
1answer
97 views

Filter results with not like

I have to query task object to get the rows with subject not starting with 'Email' . I have tried the given query. But it is not working . Please suggest. select status, subject, whatId from task ...
0
votes
1answer
25 views

SOSL search result in c# for salesforce integration

I have used the SOSL to get the salesforce record. SOSL search result in c# for salesforce integration?
0
votes
2answers
38 views

How to use SOSL in c# for salesforce integration

I have used the SOQL to get the salesforce record. sforce.SforceService SFDCSer; qr = SFDCSer.query('select id,name from account'); sforce.sObject[] queryresutls = qr.records; ...
4
votes
1answer
61 views

Can we Scan more than 50000 record using SOSL query

As mentioned in Salesforce doc that it can return 2000 records but what about scanning 500K records. Is there any limit on records that will be scanned.
2
votes
0answers
64 views

SOSL Queries returning empty lists

When you do a SOSL query - the result is in the form of multiple lists (one for each object you search). List<List<sObject>> resultsList = [FIND 'test' IN NAME FIELDS RETURNING ...
2
votes
1answer
73 views

SOSL Statement Example

Can someone please explain what the following query does..? List<List<sObject>> results = [FIND '4155557000' IN Phone FIELDS RETURNING Contact(Id, Phone, FirstName, LastName), ...
3
votes
2answers
206 views

What's the correct syntax for this SOSL sent via the REST API?

I'm trying to retrieve an Id from Salesforce over the REST API using SOSL. My query which I can execute without issue in the Developer Console is: FIND '(415)901-7000' IN PHONE FIELDS RETURNING ...
1
vote
1answer
146 views

Is there a way to search a long text area for contains string in SOSL

I have a request for fix a typo in a long text area. So it might be worthwhile for me to search for the same typo for all the objects of that type. Since SOQL can't filter on long text area, I guess ...
6
votes
2answers
132 views

Duplicate IDs in sandbox - how come?

We've been struggling with an internal server error if the SOSL search text is test: List<List<Account>> accounts = [FIND 'test' IN ALL FIELDS RETURNING Account(Name, Description, ...
3
votes
2answers
61 views

How to get a list of sidebar fields programmatically?

Is there a way to programmatically determine which fields of an object are searched during sidebar search? Also, for custom objects, how does Salesforce decide which fields should be searched?
0
votes
1answer
52 views

Need Better Search Conditions on Duplicate VF Page [closed]

I have an apex class that brings up duplicates when a user enters in an account name in the search box on the visualforce page. Right now, the search takes the exact letters written into the search ...
6
votes
2answers
209 views

Sanitize a string before injecting it into SOSL

Is there a way through the .net framework or some other package to sanitize strings so that they can be safely used in sosl? Is there any larger standard that SOSL falls under? I was able to find How ...
4
votes
0answers
153 views

Can SOSL perform full text search on chatter files?

The Document sobject has an IsBodySearchable flag which controls if you can full text search it via SOSL. ContentVersion has no such flag but I know that it is searchable in certain cases. However, ...
1
vote
1answer
165 views

Problem with WHERE Clause in SOSL to search KnowledgeArticles

I am trying to search case,solution and KnowledgeArticles with following SOSL FIND 'lithium' RETURNING Dissusion__kav (Title, Summary, LastPublishedDate, KnowledgeArticleId, UrlName WHERE ...
3
votes
1answer
275 views

SOSL FIND verses SOQL WHERE

Is there any way to convert SOSL Find clause into SOQL where clause ? For example following SOSL and SOQL both have same filter criteria. SOSL: FIND {'ABC' and 'XYZ'} IN ALL FIELDS Returning ...
2
votes
1answer
103 views

Field level security and UI search / API search

I have noticed that if I use field level security to hide a field for a custom profile, a user in the profile can still global search for text in that field and the record will appear in the results, ...
5
votes
6answers
530 views

Most efficient (instant / no Batch) way to mark thousands of records as dirty

I have the requirement to store and retrieve the information that a set of arbitrary sobject records are "dirty" and need to be touch by asynch processes. I am talking about 10.000 to 100.000 records ...
4
votes
1answer
432 views

Escaping reserverved characters in SOSL queries

Escaping reserverved characters with backslash as described in Force documentation (http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_find.htm) give unexpected ...
6
votes
1answer
219 views

Clarification on Unit Testing a method that runs a SOSL query

I have a controller method that uses a SOSL query to generate a list of options. It works when used in the VF page, but the unit test is failing; logging shows the SOSL query is returning no results. ...
6
votes
3answers
454 views

How do I SOSL across objects, matching all records with FIND clause?

To all the expert SOSL gurus lurking out there, I thought this will be an interesting one: I have some SObjects of different types and I want to return their Name values in a single query. In ...
0
votes
2answers
460 views

How to Search contacts using wildcard characters(*,%,?) in salesforce

Please give me answer for "How to Search(box) list of contacts using wildcard characters(*,%,?) in salesforce "
4
votes
2answers
360 views

SOSL returning maximum of 500 records

I am using SOSL to search records in Salesforce. According to document http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_limit.htm, It should return 2000 records but ...
1
vote
1answer
115 views

Doubts on SOSL limits

I am trying SOSL for first time and have some questions related to limits. As per document http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_limit.htm It says, ...
5
votes
1answer
167 views

Can SOSL be used with more record than SOQL?

Because our client has a LOT of records (I have no idea how much), my colleagues feel it is necessary to use a SOSL query rather than a SOQL query, but I've never heard anything suggesting that SOSL ...
3
votes
1answer
128 views

Issue with SOSL search API

I am using salesforce API to do a SOSL search with the CJK charcters. But I am getting more irrelevent results. So when I search in the salesforce doc I got an information like "In Chinese, Japanese, ...
3
votes
1answer
102 views

SOSL Filter by Library on Salesforce Content

Is is possible to search Salesforce Content in a specific library (ie. ContentWorkspace)? According to the Content data model, it seems the relationship between ContentWorkspace and ContentVersion ...
3
votes
1answer
416 views

SOSL and “ends with” wildcard

I am trying to implement a SOSL search function that uses an "ends with" wildcard, like *searchString in SOQL. No luck! I know about this limitation of SOSL Asterisks match zero or more characters ...
3
votes
0answers
107 views

How can I access Record Tags and/or Content tags via Apex & SOQL & SOSL

I have a requirement to produce a unified search across Salesforce records using tags and documents in Content. Both records and Content items may have received the same tag from a user and my ...
3
votes
1answer
263 views

SOSL - Return correct related record type

I'm having an issue with the type field on related records from an SOSL search. In our organization, Leads can be owned by either a User or a Group/Queue and Accounts can only be owned by Users. ...
6
votes
2answers
196 views

Check if a .txt file of IDs all exist in Salesforce

I receive a .txt files of type ID, e.g. 003U000000PL9LN, 001U000000PL9LM, a1fU000000PL9LO. I need to check if these IDs correspond to valid objects within Salesforce. I have a List of IDs in Apex. ...
1
vote
2answers
386 views

SOQL query by data type

Is it possible to query fields by datatype? I need to query all email fields from different objects. Email field names are different on each object and not known in advance. So I am trying to query by ...
2
votes
1answer
237 views

How to order SOSL results by relevance

How can I order the results of a SOSL query by relevance, meaning the result with the most matches of my OR term first? I have an Apex class that uses SOSL to find potential duplicates for a new bug ...
3
votes
1answer
1k views

How to Search a text in all fields in all objects and return all values?

Can I find a string from all fields from all custom and standard objects and return the data (all field data) of all the records that matches for all the fields of those objects?? Also is there an ...
1
vote
2answers
727 views

Using SOSL to find all related records

I am trying to write a query to find all child records of a parent record. I know I can do this with a SOQL on each child object, but I want to do something slicker. For example, my parent object is ...
3
votes
1answer
417 views

Knowledge - How to filter SOSL results by a SOQL and save on API calls?

My organization frequently does work with SalesForce knowledge. And the recommended way to search Knowledge is either by the exact type of the article that you created in your instance or by the ...
3
votes
1answer
382 views

Search formula fields using SOSL

Im trying to build a custom job board search on visualforce. I have a positions object which has a relationship has a master detail field to account. I'd like the search to return positions when you ...
6
votes
3answers
281 views

How to search for a long list of arguments

We have reports to search all cases that contain certain serial numbers (strings) in a custom text area field that can contain a comma-separated list of serial numbers. Additionally, serial numbers ...
3
votes
2answers
170 views

Unable to Access Page

I get the following error when I run the following class: public with sharing class CaseUpdatePriorityEmailBodyMisc { public void updateCaseWhenDiscriptionFindBadWord(){ List<Case> ...
6
votes
3answers
575 views

What is the maximum number of rows that SOQL and SOSL can “scan”?

It's quite clear from the governor limits documentation how many records can be returned, and the docs do mention that SOQL in a trigger will scan a maximum of 100k records. So my questions are: For ...
5
votes
1answer
175 views

What is the max length of a SOSL search expression?

My SOSL query with an extremely long search expression failed with System.UnexpectedException: Search Term exceeded max length Searching the Documentation I could not find anything about a max ...