Apex Reference Guide
Winter '27 preview (API version 68.0)
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Release Notes
CommerceOrders Namespace
commonserviceexcellence Namespace
ComplianceMgmt Namespace
Context Namespace
DataRetrieval Namespace
ExternalService Namespace
Flowtesting Namespace
disputemanagement Namespace
fsccashflow Namespace
fsccomplaintmanagement Namespace
fschousehold Namespace
fscserviceprocesses Namespace
fscwmgen Namespace
industriespersonalizedfinance Namespace
IssueCreditMemo Namespace
ind_mfg_sample_mgmt_apex Namespace
IndustriesDigitalLending Namespace
InvoiceWriteOff Namespace
PlaceQuote Namespace
renew_assets_summary Namespace
RevSignaling Namespace
RevSalesTrxn Namespace
RulesAppln Namespace
runtime_industries_cpq Namespace
runtime_industries_insurance Namespace
Slack Namespace
Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
sfsqlquery Namespace
Contains classes for executing SQL queries against Data 360 data spaces from Apex.
The following are the classes in the sfsqlquery namespace.
-
QueryHandle Class
Tracks the runtime execution state of a Data 360 SQL query as it progresses through submission, execution, and result retrieval. Use QueryHandle to resume a previously submitted query from a saved query ID in a new SqlRowIterator or a new SqlQueueable job. -
Row Class
Wraps a single Data 360 SQL query result row and provides typed accessor methods for retrieving column values by name or by 0-based index. Row instances are produced by SqlRowIterator and SqlQueueable; you don't construct Row objects directly during normal usage. -
SqlQueueable Class
Abstract base class for executing long-running Data 360 SQL queries asynchronously in chained Queueable jobs. Implements Queueable and Database.AllowsCallouts. Create a concrete subclass that implements processDataChunk() to process each page of results and chainNextJob() to enqueue the next job when more data remains. -
SqlRowIterator Class
Synchronous iterator for executing Data 360 SQL queries and retrieving results row-by-row within the current transaction. Implements Iterator<Row> and Iterable<Row> for use in both for-each and while loops. The iterator is single-use; once all rows are consumed, iterating again does not restart from the beginning. -
SqlStatement Class
Encapsulates the inputs required to execute a Data 360 SQL query against a data space. Build a statement from a raw SQL string or a pre-built ConnectApi.QuerySqlInput object, and then execute synchronously with SqlRowIterator or pass it to a SqlQueueable subclass for asynchronous processing. -
SqlTester Class
Test utility for mocking Data 360 SQL query API responses in Apex tests. The framework automatically detects the test context via Test.isRunningTest() and returns mocked responses when configured. Call clearMocks() before each test to ensure a clean state.