SCOPE CONTENT
In v8.0+, use SCOPE CONTENT with FIND to search within document content.
Syntax
Section link for SyntaxSELECT {fields}
FROM documents
FIND ('{search phrase}' SCOPE CONTENT)Query Examples
Section link for Query ExamplesThe following are examples of queries using SCOPE CONTENT.
Query: Search Document Content
Section link for Query: Search Document ContentThe following query retrieves documents with the search term insulin within the content:
SELECT id, name__v
FROM documents
FIND ('insulin' SCOPE CONTENT)Query: Search Related Document Content
Section link for Query: Search Related Document ContentThe following query retrieves Product records where the term cholecap appears in the content of the Materials (materials__c) related document:
SELECT id, name__v
FROM product__v
WHERE id IN (SELECT id FROM materials__cr FIND ('cholecap' SCOPE CONTENT))