I'm trying to play around with SOSL and was wondering is it possible to look for record ID's using SOSL?

I tried


But it comes back with no records

Thank you

2 Answers 2


Not really, and if you could you probably wouldn't want to.

You could make it work by copying the record Id to a text field using something like a before-save record triggered flow, but at that point you're really better off just writing a SOQL query instead.

SOSL is meant to search text fields (Name/Subject/Title/etc..., email fields, phone fields) where you know that some text exists, but not necessarily which field(s) or object(s) they exist in.

The governor limit on SOSL queries is even stricter (20) than the one for SOQL queries (100).


The SOSL documentation is pretty explicit:

You can search text, email, and phone fields

Id fields are none of the above.

If the ID existed inside a text string (such as a text area long field where you are logging stuff), then that record would be found

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .