Toast Message Updates | Close Actions, Hyperlinks, Toast Library Lightning Web Components Salesforce

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • In this video I will show you how you can some new updates in Toast Message functionality.
    It was recently introduced in Salesforce latest release. These new update includes -
    1. New Toast Library
    2. Hyperlinks
    3. Close Action
    #toast #LWC #salesforce
    Join me on Instagram : / iamkapilbatra
    My journey : www.salesforce...
    Blog : www.salesforce...
    Website : www.salesforce...​​
    LinkedIn : / salesforcebolt
    Twitter : / salesforcebolt​​
    Facebook : / iamsalesforcebolt

Комментарии • 6

  • @raghavendrasharma2466
    @raghavendrasharma2466 Год назад +2

    Hi Salesforce Bolt,
    Could you please help me. A question was asked in my interview today, the question is
    How do we fetch all accounts that have at least one or more contacts and we have to show fields like account name, last modified contact name related to account and in the org we have millions of accounts and contacts. And data have to show in datatable in LWC.

    • @starman9000
      @starman9000 11 месяцев назад

      @raghavendrasharma2466, It was a good Question!! You can't do this in apex class unless you are using Batch Apex. Salesforce don't allow to compare LastModifiedDate > CreateDate, but there is a workaround , Create a Formula field in Contact Object ie, IsLastModifiedRecord__c and add the comparision 'LastModifiedDate > CreatedDate' and then soql use as follows
      List accWithLastModifiedContacts = new List();
      List accounts = [ SELECT Id,Name,(select Id from Contacts where IsLastModifiedRecord__c = true) FROM Account];
      for(Account a : accounts){
      List contacts = a.Contacts;
      if(contacts.size() > 0){
      System.debug(contacts.size());
      accWithLastModifiedContacts.add(a);
      }
      }
      since you are query million records it must be happen in the BatchApex class only. Since you should use on LWC pagination should be implemented.

  • @kapilsane
    @kapilsane Год назад +1

    Sir, can we show only taost message instead of loading the component, just like a validation rule.

    • @SalesforceBolt
      @SalesforceBolt  Год назад

      Unfortunately no, it has to be inside a component.

  • @nithinthampi8906
    @nithinthampi8906 7 месяцев назад +1

    Hi, Is it possible to redirect to a record from the toast?

    • @SalesforceBolt
      @SalesforceBolt  7 месяцев назад

      Yes in hyperlink you can give url of the record.