Close Menu
SalesforceCodex
    Facebook X (Twitter) Instagram
    Trending
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    • Top 10 PMD Issues Salesforce Developers Should Focus on in Apex
    • How to Use Graph API for Outlook-Salesforce Connection
    Facebook X (Twitter) Instagram
    SalesforceCodex
    Subscribe
    Thursday, May 29
    • Home
    • Architecture
    • Salesforce
      • News
      • Apex
      • Integration
      • Books Testimonial
    • Questions
    • Certification
      • How to Prepare for Salesforce Integration Architect Exam
      • Certification Coupons
    • Integration Posts
    • Downloads
    • About Us
      • Privacy Policy
    SalesforceCodex
    Home»Salesforce»Salesforce Winter 20 Release – Code Enhancement in Apex

    Salesforce Winter 20 Release – Code Enhancement in Apex

    Dhanik Lal SahniBy Dhanik Lal SahniAugust 29, 2019No Comments4 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Salesforce Winter 20 Release – Code Enhancement in Apex
    Share
    Facebook Twitter LinkedIn Pinterest Email

    New Apex Classes

    These classes were introduced in Winter 20 release.

    Formula Class in the System Namespace:

    The new System.Formula class contains the recalculateFormulas method that updates (recalculates) all formula fields on the input sObjects.
    Recalculates all formula fields on an sObject, and sets updated field values. Rather than inserting or updating objects each time you want to test changes to your formula logic, call this method and inspect your new field values. Then make further logic changes as needed.

    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

    Below interfaces were introduced in this release.

    TxnSecurity.EventCondition

    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.

    TxnSecurity.AsyncCondition

    This interface allows an implementing class to make asynchronous Apex calls. This interface is part of Real-Time Event Monitoring.

    Changed Apex Classes

    Below existing classes have new or changed methods or constants.

    Auth.SessionManagement Class

    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.

    EventBus.ChangeEventHeader Class

    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.

    System.Type Class

    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.

    System.UserManagement Class

    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.

    Chatter Feeds

    ConnectApi.EmailMessageCapability Class

    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:
      • DraftStatus
      • ForwardedStatus
      • NewStatus
      • ReadStatus
      • RepliedStatus
      • SentStatus

    Communities

    ConnectApi.Community class

    guestMemberVisibilityEnabled(property) is added which specifies whether guest members can see other members of the community (true) or not (false).

    Managed Content

    ConnectApi.ManagedContentAssociations class

    topics(property) is added which show collection of topics associated with the managed content.

    ConnectApi.ManagedContentNodeValue class

    This class is added in Winter 20 release. Along with this multiple sub classes are also added for community content management.

    • ConnectApi.ManagedContentMediaNodeValue
    • ConnectApi.ManagedContentNodeType
    • ConnectApi.ManagedContentTextNodeValue
    • ConnectApi.ManagedContentType
    • ConnectApi.ManagedContentVersion
    • ConnectApi.ManagedContentVersionCollection

    New Chatter in Apex Enums

    ConnectApi.ManagedContentMediaType: Below values is added in this enum.

    • Image

    ConnectApi.ManagedContentNodeType: Below enum values are added.

    • Media
    • MultilineText
    • NameField
    • RichText
    • Text

     

    Reference : https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_apex_nc.htm

    apex Chatter Winter 20
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleWinter 20 Release – Code Enhancement in LWC
    Next Article Map with Orthographic (globe) projection in Lightning
    Dhanik Lal Sahni
    • Website

    Related Posts

    By Dhanik Lal Sahni4 Mins Read

    How to Build a Generic Modal Window in Lightning Web Component

    May 26, 2025
    By Dhanik Lal Sahni6 Mins Read

    Top 10 Salesforce Flow Features of Salesforce Summer ’25

    May 11, 2025
    By Dhanik Lal Sahni6 Mins Read

    Unlock the Power of Vibe Coding in Salesforce

    April 30, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn Reddit Telegram
    © 2025 SalesforceCodex.com. Designed by Vagmine Cloud Solution.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.