Close Menu
SalesforceCodex
    Facebook X (Twitter) Instagram
    Trending
    • 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
    • Enhancing Performance with File Compression in Apex
    • Salesforce Spring ’25 Release: Top Flow Enhancements You Need to Know
    Facebook X (Twitter) Instagram
    SalesforceCodex
    Subscribe
    Friday, May 9
    • 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»Winter 20 Release – Code Enhancement in LWC

    Winter 20 Release – Code Enhancement in LWC

    Dhanik Lal SahniBy Dhanik Lal SahniAugust 29, 2019Updated:June 3, 2020No Comments5 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Winter 20 Release – Code Enhancement in LWC
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Developers can find new and changed objects, calls, classes, components, commands, and more that help you customize Salesforce features in Winter 20 release.

    Lightning Components:

    Changed Lightning Web Components

    Build a UI easily with these new and changed resources in Lightning Web Component. Below components have changes.
    lightning-button:
    1. click() method has been added.
    2. The variant attribute supports new values
      1. brand-outline—Similar to the brand variant, this variant draws attention to the primary action on a page. The blue color is used only for the label and border, and the button color is white. Use this variant when the brand variant is too distracting to the experience.
      2. destructive-text—Similar to the destructive variant, this variant indicates a destructive action to the user, like permanently deleting data. The red color is used only for the label and border, and the button color is white. Use this variant when the destructive variant is too distracting to the experience.
    lightning-button-icon : The click() method has been added.
    lightning-button-menu : The click() method has been added.
    lightning-carousel : Swiping carousel images is now supported on mobile devices.
    lightning-combobox : 

    The following attributes are added

    • aria-labelledby—A space-separated list of element IDs that provide labels for the combobox.
    • aria-describedby—A space-separated list of element IDs that provide descriptive labels for the combobox.

    lightning-datatable :

    The url type has changed the default behavior for the following attributes.

    • target—Links now open in the same frame by default (or the same browser tab if a frame is not used), which corresponds to the _self target value. To open links in a new tab, use this column definition.
      var columns = [
          { 
              label: 'Company Website', fieldName: 'website', type: 'url', 
                  typeAttributes: { target: _blank }
          }...
      ]
    • tooltip—The URL field no longer displays a tooltip if a tooltip value isn’t provided. To display a tooltip with the URL value, use this column definition.
      var columns = [
          { 
              label: 'Company Website', fieldName: 'website', type: 'url', 
                  typeAttributes: { 
                      tooltip: { fieldName: 'website' } 
                  } 
          },
      // other column data 
      ]

    lightning-formatted-number : Arabic, Hindi, and Persian numbers are now supported.

    lightning-formatted-rich-text : The mark HTML tag is now supported.

    lightning-formatted-url : The click() method has been added.

    lightning-record-edit-form :

    onchange event: This component clears validation rule errors when an onchange event is fired on the overall form and when you update a field with a validation rule error. This change also applies to lightning-record-form.

    lightning-input-field : required attribute is added to mark filed required at client side.

    lightning-tab : 

    The following attributes are new.

    • end-icon-name—The name of a utility icon to display after the tab’s label.
    • end-icon-alternative-text—Alternative text for the end icon.

    lightning-tree : selected-item attribute added to select and highlight specified tree item.Tree item names are case-sensitive. If the tree item is nested, selecting this item also expands the parent branches.

    lightning/flowSupport:

    Lightning web component can now added in flow screen. To make a Lightning web component available to a flow screen as a screen component, lightning__FlowScreen must be a target in the component’s targets tag, and the isExposed tag must be set to true. The component can use events in the new lightning/flowSupport module.

    Below Events included to provides access to flow events. Use these events to control flow navigation and notify the flow runtime of changes in attribute values.

    • FlowAttributeChangeEvent—Informs the flow runtime that a component property has changed.
    • FlowNavigationBackEvent—Requests navigation to the previous screen.
    • FlowNavigationNextEvent—Requests navigation to the next screen.
    • FlowNavigationPauseEvent—Requests the flow runtime to pause the flow.
    • FlowNavigationFinishEvent—Requests the flow runtime to finish the flow.
    // Syntax
    import {LightningElement, api} from 'lwc';
    import {FlowAttributeChangeEvent, FlowNavigationNextEvent} from 'lightning/flowSupport';
    export default class MyFlowComponent extends LightningElement {
      @api
      numberOfClicks = 0;
      handleClick() {
        // Notify flow that the number of clicks has increased.
        let newNumClicks = this.numberOfClicks + 1;
        const attributeChangeEvent = new FlowAttributeChangeEvent('numberOfClicks', newNumClicks);
        this.dispatchEvent(attributeChangeEvent);
      }
      handleGoNext() {
           // Navigate next when user clicks next button.
           const nextNavigationEvent = new FlowNavigationNextEvent();
           this.dispatchEvent(nextNavigationEvent);
      }
    }

    @salesforce/client/formFactor:

    This will indicate the form factor of the hardware on which the browser is running. Possible values are:

    • Large—Desktop client
    • Medium—Tablet client
    • Small—Phone client

    These values need to pass in getRecordCreateDefaults wire adapter to get the default layout information and object information for creating a record.

     

    @salesforce/messageChannel (Developer Preview)

    Lightning Message Service API is added to communicate across the DOM, between Aura components, Visualforce pages, and Lightning web components. A Lightning web component uses a Lightning message channel to access the Lightning Message Service API.

    / Syntax
    import channelName from '@salesforce/messageChannel/channelReference';

    channelName—An imported symbol that identifies the message channel.

    // Syntax for resources in a managed package
    import channelName from '@salesforce/messageChannel/namespace__channelReference';

    channelReference—The API name of the message channel.

    namespace—If the message channel is in a managed package, this value is the namespace of the managed package. If the message channel is not in a managed package, omit the namespace.

    For more information, see Communicate Across Salesforce UI Technologies with Lightning Message Service.

    lightning/uiRecordApi

    Non-array strings are now supported for the following parameters in the getRecord wire adapter.

    • fields
    • layoutTypes
    • modes
    • optionalFields

    Non-array strings are now supported for the following parameter in the getRecordUi wire adapter.

    • optionalFields

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

    apex lightning Lightning web component salesforce Winter 20
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleSalesforce Winter 20 Release – Feature Enhancements For Apex
    Next Article Salesforce Winter 20 Release – Code Enhancement in Apex
    Dhanik Lal Sahni
    • Website

    Related Posts

    By Dhanik Lal Sahni6 Mins Read

    Unlock the Power of Vibe Coding in Salesforce

    April 30, 2025
    By Dhanik Lal Sahni5 Mins Read

    How to Implement Dynamic Queueable Chaining in Salesforce Apex

    April 21, 2025
    By Dhanik Lal Sahni5 Mins Read

    How to Implement Basic Queueable Chaining in Salesforce Apex

    March 31, 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
    • 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
    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 (110) 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) custom metadata types (5) design principle (9) file upload (3) flow (14) 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 (29) Lightning web component (61) lwc (50) named credential (8) news (4) optimize apex code (4) Permission set (4) Queueable (9) rest api (23) S3 Server (4) salesforce (139) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce GraphQL API (3) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) shopify api (3) 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
    • 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
    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 (110) 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) custom metadata types (5) design principle (9) file upload (3) flow (14) 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 (29) Lightning web component (61) lwc (50) named credential (8) news (4) optimize apex code (4) Permission set (4) Queueable (9) rest api (23) S3 Server (4) salesforce (139) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce GraphQL API (3) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) shopify api (3) 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.