Apex: New and Changed Items

These classes, enums, and interfaces are new or have changes.

For more information on these enhancements, see the Apex Developer Guide and the Apex Reference Guide.

ConnectApi Namespace

The ConnectApi namespace (Connect in Apex) has new or changed classes, methods, or enums.

Many Connect REST API resource actions are exposed as static methods on Apex classes in the ConnectApi namespace. These methods use other ConnectApi classes to input and return information. The ConnectApi namespace is referred to as Connect in Apex.

For the new and changed ConnectApi classes, methods, and enums, see ConnectApi (Connect in Apex): New and Changed Classes and Enums.

Context Namespace

The Context namespace has this new method.

New Method in Existing Class

Delete records from a context session
Use the new deleteRecords() method on the existing IndustriesContext class.

DocumentAI Namespace

The DocumentAI namespace has these new classes.

New Classes

Represent errors and additional contextual information generated during Document AI processing
  • Use the Error class.
  • Use the ExtractionMetadata class.
Configure duplicate detection rules and object-specific entity settings for processing extracted data
  • Use the DuplicateRuleConfiguration class.
  • Use the DuplicateObjectConfiguration class.
  • Use the ObjectConfig class.
Manage input and output payloads for the Document AI post-transform process
  • Use the PostTransformInput class.
  • Use the PostTransformResult class.
Handle structured nodes and field-level attributes extracted from documents, including matching record details
  • Use the Node class.
  • Use the Attribute class.
  • Use the MatchingRecord class.
Process input and capture results for the Document AI post-save workflow
  • Use the PostSaveInput class.
  • Use the PostSaveResult class.
  • Use the SavedRecordDetail class.
Schedule batch jobs for Document AI processing
Use the BatchProcessor class.

hlthcrbilling Namespace

The hlthcrbilling namespace has these new classes.

New Classes

Capture billing information for products in Salesforce Health Cloud
  • Use the ProductBillingDetails class to manage billing details for ordered products, including account, work type, and shipping address information.
  • Use the ProductDetails class to represent individual product line items, including price book entries, quantities, and pricing attributes.

Invocable Namespace

The Invocable namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New Classes

Get metadata about an invocable action
Use the getCategory(), getDescription(), getInputs(), getOutputs(), and getTargetEntityName() methods in the new Action.DescribeResult class.
Get metadata about input parameters used by an invocable action
Use the getAdditionalAttributes(), getApexClass(), getName(), getPicklistValues(, and getType() methods in the new Action.InputParameterclass.
Get metadata about output parameters returned by an invocable action
Use the getCategory(), getDescription(), getInputs(), getOutputs(), and getTargetEntityName() methods in the new Action.OutputParameter class.
Get metadata about generic type parameters that can be used with an invocable action
Use the getDescription(), getLabel(), getName(), and getSuperType() methods in the new Action.GenericType class.
Get metadata about additional attributes associated with an invocable action
Use the getApexClass(), getDataType(), getIsCollection(), getName(), and getValue() methods in the new Action.AdditionalAttribute class.
Get metadata about values in a picklist used by an invocable action parameter
Use the getActive(), getDefaultValue(), getLabel(), getValidFor(), and getValue() methods in the new Action.PicklistValue class.

New or Changed Methods in Existing Classes

Return metadata for an invocable action
Use the new getDescribe() method of the existing Action class.
Get the version of an invocable action
Use the new getVersion() method of the existing Action class. This method was introduced in API version 66.0 and has been added to the Apex Reference Guide.

Messaging Namespace

The Messaging namespace has these new methods.

New or Changed Methods in Existing Classes

Set custom headers
Use the new setCustomHeaders(customHeaders) method on the existing SingleEmailMessage class to attach custom metadata headers to an outgoing email. Header names must be prefixed with X-SFDC-X- and comply with RFC 822 and RFC 5322 specifications.
Get custom headers
Use the new getCustomHeaders() method on the existing SingleEmailMessage class to retrieve the map of custom headers previously set on the email. Returns null if no custom headers were set.

CommercePayments Namespace

The CommercePayments namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New Classes

Specify enhanced payment data, including Level 2 and Level 3 fields associated with the payment
Use the EnhancedPaymentDataInput class.
Specify the list of individual line items associated with the payment
Use the LineItemInput class.

New or Changed Properties in Existing Classes

Capture enhanced payment data, including Level 2 and Level 3 fields
Use the new enhancedPaymentData property of the existing SaleRequest class.
Capture ID of the source that initiated the payment
Use the new paymentInitiationSourceId property of the existing SaleRequest class.
Authorize Saved Payment Methods for Commerce Subscriptions with Third-Party Gateways
Use the new paymentMethodData property of the existing AuthorizationRequest class.

sfsqlquery Namespace

The sfsqlquery namespace has these new classes and methods.

New Classes

Access Data 360 SQL query results from a saved query ID
Use the create(), toString(), withOffset(), and withWorkloadName() methods in the new QueryHandle class.
Access typed column values from Data 360 SQL query results
Use the getBoolean(), getColumnIndex(), getDate(), getDateTime(), getDecimal(), getDouble(), getInteger(), getList(), getLong(), getObject(), getRawRow(), getString(), getTime(), and toString() methods in the new Row class.
Execute Data 360 SQL queries in Queueable Apex
Use the cancel(), chainNextJob(), getColumnNames(), getMetadata(), getPageOutput(), getQueryId(), getRows(), processDataChunk(), and toString() methods by extending the new SqlQueueable class.
Execute synchronous Data 360 SQL queries
Use the cancel(), getColumnNames(), getMetadata(), getQueryId(), hasNext(), iterator(), next(), and toString() methods in the new SqlRowIterator class.
Build and execute Data 360 SQL query statements
Use the create(), execute(), toString(), and withWorkloadName() methods in the new SqlStatement class.
Mock Data 360 SQL query responses in tests
Use the clearMocks(), enqueueMockRows(), isRunningTest(), setMockMetadata(), and setMockRows() methods in the new SqlTester class.

System Namespace

The System namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New Classes

Run integration tests with Agentforce and Data 360 services
Use the new IntegrationTest class.

New or Changed Methods in Existing Classes

Use improved interpolation for single and multiline strings
Use the new template() instance method on the existing String class.