Skip to content

SCOPE CONTENT

In v8.0+, use SCOPE CONTENT with FIND to search within document content.

SELECT {fields}
FROM documents
FIND ('{search phrase}' SCOPE CONTENT)

The following are examples of queries using SCOPE CONTENT.

The following query retrieves documents with the search term insulin within the content:

SELECT id, name__v
FROM documents
FIND ('insulin' SCOPE CONTENT)
Section link for Query: Search Related Document Content

The 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))