Skip to main content

#Lightning Web Components4 discussing

We use the activities timeline on both Financial account pages and Account pages (Person, Household, Institution). On the financial account page, our activity timeline has one of our custom Task record types "Compliance Task" as an option to submit directly there. We do not have it on any other activity page on any other lightning page. I am trying to figure out why it is only showing there? I would like to have it be available option on all pages.  

Customize Salesforce Lightning component for Activities Timeline

 

 

Account Level Activity Options.png

 

 

 

#Financial Services Cloud  #Tasks  #Lightning Web Components

0/9000

Do you use managed packages built with Lightning Web Components? Your Salesforce users might be losing 30+ seconds every day on their initial record load due to a Salesforce known issue that needs to be better prioritized. 

 

Have you noticed how on some Lightning record pages, the initial load takes 30+ seconds and seems totally unexplainable? Then after that first load, it's fine for the rest of the day. 

 

Here's what makes this worse than it looks: it's not a one-time delay. Every individual user hits their own cold start, so if you have 50 users opening an affected record type each morning, that's 50 separate 30-60 second delays, every single day. The productivity cost scales directly with your user count. 

 

We spent weeks investigating this on our managed package pages with the managed package vendor before Salesforce support confirmed it's a platform-level known issue affecting Lightning pages with shared component subtrees, not something specific to any one vendor's code: 

Known Issue: Flexipage performance degradation on DynamicComponent

 (Reference ID: W-23284931) 

 

This known issue feels significantly underreported for how big the impact is. If you've written it off as your imagination, blamed it on a slow server day, assumed it'll just go away, or your users have just been complaining without ever filing a ticket, this is likely why. 

 

If you manage Lightning pages with complex or shared component structures and have noticed this pattern, please report the known issue above against your own org and ask your AM for a timeline of when the issue will be fixed. At a minimum, it just takes clicking a checkbox on the known issue. I am hoping more visibility on the known issue means more pressure on Salesforce to prioritize a fix. 

 

#Lightning Performance  #Lightning Web Components  #Installed Packages  #Salesforce Admin  #Salesforce

0/9000

API: lightning/modal (LightningModal)

- Property: disableClose

- Expected: close button should be suppressed

- Actual: Modal still closes despite disableClose = true

- Condition: LWS enabled (Locker not in effect)

- Reproducible: 100% / Intermittent

- API Version: xx.x

- Org Type: Sandbox / Production / Scratch Org

- Workaround attempted: [none / custom CSS / manual event interception]

 

 

#Lightning Web Components  #Salesforce Platform

1 answer
  1. Aug 10, 7:10 AM

    Hello @Michael Huang

    • Confirm LWS state properly, since stale caching can make behavior look like it's tied to LWS when it's just browser cache — refresh + hard clear cache before trusting the repro. 
    • Check whether the "close" the user triggers is the built-in header icon/ESC, or a custom button/action — if custom, that's expected behavior, not a bug.
    • Check reactivity: if disableClose is set via mutating a property on an object rather than reassigning it, LWS's proxy membrane can silently swallow that mutation for cross-namespace objects — leading to disableClose never actually flipping to true from the modal's perspective even though your component "sees" it as true. That's a classic LWS mutation-alternatives issue and worth checking with the LWS Distortion Viewer.
    • Verify ESC-key handling isn't attached at document/window level in a way that crosses the LWS namespace boundary (also part of the mutation/proxy troubleshooting docs).
    • https://developer.salesforce.com/docs/platform/lightning-components-security/guide/lws-troubleshoot.html
0/9000
0/9000

I use the Lightning Component "Tab" on a lightning page. Is there a way to get the URL to one of the component's tabs? Hovering over a tab just shows "javascript:void(0)".

 

For example, I want to give a user a direct link to the "Decisions" tab. But I can't because I don't know the URL to that tab.

URL to Lightning Component Tab?

 

Thanks,

 

Marc

 

#Lightning Component  #Lightning Web Components

5 answers
0/9000

Hello All,

 

Is there a way to edit fields (similar to inline editing) on a related list on a Lightning Record page? To clarify, I don't mean edit the fields to display, I mean actually updating a field, like adding a data to a date or name field on the related record directly from the lightning record page.

 

Thank you!

Hindy

 

#Lightning #Lightning Web Components #Related Record

6 answers
0/9000

Preventing Recursive Lightning Message Service Calls in Screen Flow LWCs Using a Source Flag 

When working with Lightning Message Service (LMS) inside Screen Flow embedded LWCs, communication between components becomes extremely powerful — but it can also introduce unexpected recursive behaviour.

Recently, I encountered an interesting real-world scenario where two LWCs on a Screen Flow were unintentionally triggering each other repeatedly, causing incorrect value population even though the logic looked perfectly fine.

This blog walks through:

  •  The Scenario 
  •  The Problem 
  •  Debugging Process 
  •  Root Cause 
  •  The Solution (Using Source Flag) 
  •  Best Practices 
  •  Final Takeaways 

Scenario

I had a Screen Flow containing two Lightning Web Components:

  • LWC A — Publishes some values 
  • LWC B — Publishes some values 
  •  Both components subscribe to the same Lightning Message Channel

So essentially:

  •  LWC A publishes → LWC B receives 
  •  LWC B publishes → LWC A receives 

This setup is valid and expected — and initially, everything worked correctly.

However, as the use case evolved, values started getting populated incorrectly

 

The Issue

Even though:

  •  Logic was correct 
  •  Variables were correct 
  •  Message structure was correct 

The values were getting overwritten incorrectly.

Example Behavior:

  1.  LWC A publishes value 
  2.  LWC B receives and updates 
  3.  LWC B publishes updated value 
  4.  LWC A receives again 
  5.  LWC A publishes again 
  6.  Loop continues... 

This created a recursive publish-subscribe loop

 

Debugging Approach

To identify the issue:

  •  Added console logs 
  •  Checked publish events 
  •  Checked subscription callbacks 

While debugging, I noticed:

  • Publish method firing multiple times
  • Subscription handler triggering repeatedly
  • Unexpected value overwrites

This clearly indicated recursive message passing

 

Root Cause

The root cause was:

Since both components:

  •  Subscribe 
  •  Update values 
  •  Publish again 

It resulted in infinite cross-communication.

This is a common pitfall when using Lightning Message Service with multiple publishers

The Solution — Using a Source Flag

To stop recursion, I introduced a Source Flag inside the message payload.

The idea:

  •  Each LWC sends its name as source
  •  When receiving a message: 
    •  If message source == current LWC 
    •  Ignore the message 

This prevents recursive triggering.

Example Message Payload

{

value: selectedValue,

source: 'LWC_A'

}

Implementation Example

Publisher

publishMessage() {

const message = {

value: this.selectedValue,

source: 'LWC_A'

};

publish(this.messageContext, SAMPLEMC, message);

}

Subscriber

subscribeMessage() {

this.subscription = subscribe(

this.messageContext,

SAMPLEMC,

(message) => {

if(message.source === 'LWC_A') {

return;

}

this.selectedValue = message.value;

}

);

}

 

Now the flow becomes:

  1.  LWC A publishes (source = LWC A) 
  2.  LWC B receives 
  3.  LWC B updates UI 
  4.  LWC B publishes (source = LWC B) 
  5.  LWC A receives 
  6.  LWC A updates UI 
  7.  No recursion 

#Lightning Web Components  #Lightning Message Channel  #Salesforce Developer  #Issues

0/9000

I have created an LWC where the related Apex class is querying the approval history object for all the objects and filter all records where the current user has been delegated for the approval of any of these records.

The LWC is displaying the results (records to be approved) in a similar way as the standard component “Items to Approve” does.

 

The functionality works well for admin users, if the user is admin and delegated approver, he can view all the approvals. but the records are not showing to the non admin users. Although I have mentioned that the class is as "without sharing". 

 

Can anyone guide me what I am missing, What can be done to fix this issue? 

 

#Lightning Web Components

0/9000

Search (lookup) with Record Picker Component - for Field Service Mobile now available in Beta!

Hi Everyone

If you ever wanted a Lookup capability that can be used to search and select records in offline scenarios your wait is over! We are happy to announce that Record Picker is available as a new lightning base component and can be used in custom applications for offline or online scenarios for mobile (or desktop). The component is in Beta phase in Winter '24 release for you to try out. Please provide any feedback or suggestions as you use the component. Links to relevant docs below.

 

For any feedback please reply to this thread or reach out to me or @Aurélie Merlin

Release Notes

Dev Documentation

7 comments
  1. Mar 27, 5:19 PM

    Hello @Aurélie Merlin @Niket Trivedi

     

    Lightning record picker is awesome to use and i have been replacing my custom solution with this utility, could we please explore adding these features as well please !

    • Limit the no of records in search result list so that user has flexibility to show lets say top 5 results.
    • when a selected value is being cleared out , the search is expanding to show last search results by default, until we get the feature of MRU we should stop showing that list upfront as the search box is blank upon clearing.

    looking forward to get new updates on this soon :)  

    #Lightning-record-picker 

0/9000

Current error "Cannot find Lightning Component Bundle lwc learning."  Apparently at some point I created an LWC called lwc learning or lwc_learning. I now can't find the folder or file but when attempting to deploy source to org I can't do it :(     Is there a way to ignore this file or folder specifically? Or even better find and remove the reference.     Please halp.

 

#SFDX CLI #Lightning Web Components #Lightning Configuration 

Cannot find Lightning Component Bundle

 

Screen Shot 2021-07-11 at 12.54.45 pm.png

 

Screen Shot 2021-07-11 at 12.54.54 pm.png

2 answers
  1. Feb 11, 2:45 PM

    I know this question is old, but I had a similar problem: the error indicated that itcouldn't find lwc 'ProjectAccounts' but I didn't even code a LWC with this name. Noticed that it was the exact name of my parent/project folder, not an old LWC. 

    So I renamed it with LowerCase only ( ProjectAccounts -> project-accounts) and it worked!! Maybe it's a problem with naming the sf project with Upper case 

     

    Also I used the following command in the terminal:  

    sf project deploy start --source-dir force-app/main/default/lwc/<YOUR-LWC-NAME>  --target-org <YOUR-ORG>

0/9000