New Apex Classes
Formula Class in the System Namespace:
FormulaRecalcFieldError Class in the System Namespace
The new System.FormulaRecalcFieldError class is the return type of the FormulaRecalcResult.getErrors method. It contains methods that retrieve the name of the error field and a message describing why the formula calculation failed.
FormulaRecalcResult Class in the System Namespace
The new System.FormulaRecalcResult class is the return type of the Formula.recalculateFormulas method. It contains methods that return the sObject with formulas recalculated and errors encountered while recalculating formulas on the sObject.
New Apex Interfaces
This interface allows an implementing class to specify whether to take action when certain events occur based on a transaction security policy.
This interface is part of Real-Time Event Monitoring and was beta in Summer ’19.
This interface allows an implementing class to make asynchronous Apex calls. This interface is part of Real-Time Event Monitoring.
Changed Apex Classes
New Method verifyDeviceFlow(userCode, startUrl) is added. This method verifies the user code entered during the device authentication flow and redirects users to the OAuth approval page. If users aren’t logged in, they must log in. After successful login, users are prompted to allow the device to access Salesforce data.
New Property changedfields is added. This property provide list of the fields that were changed in an update operation, including the LastModifiedDate system field. This field is empty for other operations, including record creation.
isAssignableFrom(sourceType) method is added to check whether an object of one type can be assigned from an object of another type without instantiating either object. Returns true if the two types are compatible.
initRegisterVerificationMethod(method) is added to invokes a verification challenge for registering identity verification methods with a custom (Visualforce) page. Users can register either their email address or phone number.
verifyRegisterVerificationMethod(code, method) is added to complete registering a user’s email address or phone number as a verification method when customizing the identity verification process.
ConnectApi (Chatter in Apex):
Many Chatter 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 Chatter in Apex.
New Chatter in Apex Classes
Below new methods are in the ConnectApi.ManagedContent class.
getAllManagedContent(communityId, pageParam, pageSize, language, managedContentType): This method will get all managed content versions for a community
getManagedContentByIds(communityId, managedContentIds, pageParam, pageSize, language, managedContentType): This method will get all managed content versions for a community versions by IDs
getManagedContentByTopics(communityId, topics, pageParam, pageSize, language, managedContentType) : This method will get all managed content versions for a community versions by topic names.
getManagedContentByTopicsAndIds(communityId, managedContentIds, topics, pageParam, pageSize, language, managedContentType): This method will get all managed content versions for a community versions by IDs and topic names.
Below properties are added in this output class.
- htmlExpandEmailThread—Start location of previous email thread.
- status—Status of an email message on a case. Values are:
guestMemberVisibilityEnabled(property) is added which specifies whether guest members can see other members of the community (true) or not (false).
topics(property) is added which show collection of topics associated with the managed content.
This class is added in Winter 20 release. Along with this multiple sub classes are also added for community content management.
New Chatter in Apex Enums
ConnectApi.ManagedContentMediaType: Below values is added in this enum.
ConnectApi.ManagedContentNodeType: Below enum values are added.