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

learn more… | top users | synonyms

0
votes
1answer
17 views

SOSL Question Problem

With SOSL you can search against different object types that may have similar data, such as contacts and leads. To pass this challenge, create an Apex class that returns both contacts and leads that ...
3
votes
1answer
82 views

Does SOSL use Caching?

I'm trying to re-factor a trigger because it is operating on a Contact Record type that contains more than 100,000 objects. I easily switched over to the SOSL equivilant, but now my code is behaving ...
1
vote
1answer
47 views

How to query all records changed since date?

Is there a way to query all records of all object types changed since a given date? SOQL doesn't appear to have a way to do this. I thought that the "From" clause might have a way, but when I tried ...
1
vote
2answers
48 views

Query Salesforce to find any records created in past “X” hours

My organization does monthly deployments from our sandbox to production that include bug fixes and enhancements. When we deploy to production, we do testing to make sure that everything is working as ...
2
votes
1answer
41 views

In SOSL Query I want to retrieve the records from the object which is given in custom settings?

here is my code: Page: <apex:page controller="SOSLController"> <apex:form > <apex:inputText value="{!searchStr}"/> <apex:commandButton value="Search in Account, Contact, ...
2
votes
2answers
81 views

How to Query what Salesforce SObjects a user has access to

Please suggest How to Query what Salesforce SObjects a user has access to ? Based on this i want to give access to user on particular apex tab menu . Thanks
2
votes
1answer
84 views

SOQL on Rich text fields long text

I'm working on a custom search page, which will search through the fields of the Project object. I use dynamic SOQL query similar to that: SELECT Id, Name, Link_Test__c, ...
3
votes
1answer
46 views

SOQL Query returns results, however written in SOSL it returns nothing

I am trying to find contacts by Phone number. I require using SOSL due to it's search excluding non-alphanumeric chars but cannot get the same (or any) results from SOSL as I can from SOQL. I am using ...
3
votes
0answers
57 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
108 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 ...
3
votes
1answer
41 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
120 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
20 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
59 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
64 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
45 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
283 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
38 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
103 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
32 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
53 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
81 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
1answer
88 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
161 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
272 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
199 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 ...
7
votes
2answers
155 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
68 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
66 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
268 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
179 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
221 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
347 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
124 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
610 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
582 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
271 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
537 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
544 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
410 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
137 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
185 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
130 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
122 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
465 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
131 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
286 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
218 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
411 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
270 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 ...