Getting Started
The SOSL Lib provides functional constructs for SOSL queries in Apex.
For more details, please refer to the documentation.
Examples
// FIND 'Company' RETURNING Account
List<List<SObject>> searchResults = SOSL.find('Company')
.returning(SOSL.Returning(Account.SObject))
.toSearchList();
// FIND 'Company' RETURNING Account(Id, Name ORDER BY Name)
List<List<SObject>> searchResults = SOSL.find('Company')
.returning(
SOSL.Returning(Account.SObject)
.with(Account.Id, Account.Name)
.orderBy(Account.Name)
)
.toSearchList();
Deploy to Salesforce
Documentation
Features
Read about the features in the documentation.
- Dynamic SOSL
- Control FLS
- 2.1 User Mode
- 2.2 System Mode
- Control Sharings Mode
- 3.1 with sharing
- 3.2 without sharing
- 3.3 inherited sharing
- Mocking
- Dynamic conditions
License notes
- For proper license management each repository should contain LICENSE file similar to this one.
- Each original class should contain copyright mark: Copyright (c) 2023 BeyondTheCloud.Dev