Tracking the Status of Long-Running Apex Methods in LWC

Authors

  • Bapu Rao Srigadde Salesforce Developer at Thermo Fisher Scientific, USA. Author
  • Bhavitha Guntupalli ETL/Data Warehouse Developer at Blue Cross Blue Shield of Illinois, USA. Author

DOI:

https://doi.org/10.63282/3050-922X.IJERET-V6I1P118

Keywords:

Apex, Lightning Web Components, Asynchronous Processing, Platform Events, Salesforce, Long-running Methods, Queueable Jobs, Progress Tracking, UX Optimization, Apex Continuation

Abstract

Handling timeout or long waiting operations is a major problem that Salesforce Lightning Web Components (LWC) have. In these systems, a long-running Apex operation is usually handled synchronously, which means that the whole workflow is put on hold and the user interface is not updated until the operation has been completed. Hence, the shared user interface sometimes freezes, slows down, or the user is simply "kicked out" due to timeouts and system limits. The present study focuses on creating a real-time communication channel between LWC and Apex whereby standard users are free from waiting and checking the time they can. It is enabled and maintained by a set of the latest Salesforce asynchronous features, such as Platform Events, Queueable Jobs, and the Continuation framework. The case study reveals that LWCs can now listen to server-sent events and reflect the operation statuses without any input from the users, i.e., maintenance and monitoring become invisible. These "background jobs" have reduced the latency that the user is most aware of and thus user satisfaction has been increased significantly. Monitoring completion rates could be increased by as much as 40% just by this method alone, according to the experimental data. This technique serves as a scalable model for complex Salesforce apps and thus is very beneficial in terms of system throughput and dependability. This research shows how the use of asynchronous methods coupled with real-time progress updates can be a breakthrough to the scalability and user experience of modern Salesforce implementations.

References

[1] Scott, Matthew. "DESIGN PRINCIPLES FOR BUILDING SCALABLE, MODULAR SALESFORCE APPLICATIONS WITH APEX AND LWC." (2020).

[2] Khanine, Dmitri. Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform: Implementing OmniStudio best practices for achieving maximum performance. Packt Publishing Ltd, 2024.

[3] Harding, Lee, and Lee Bayliss. "Apex, Visualforce & Lightning: Phase F." Salesforce Platform Governance Method: A Guide to Governing Changes, Development, and Enhancements on the Salesforce Platform. Berkeley, CA: Apress, 2022. 137-175.

[4] Koppanathi, Sandhya Rani. "Visualforce and Lightning Web Components (LWC) Integration." Journal of Scientific and Engineering Research 9.3 (2022): 251-257.

[5] Yin, Junjie. "Salesforce-Usability of Lightning Web Components." (2019).

[6] Kapitanov, Konstantin. "Salesforce Lightning Platform." Salesforce Developer I Certification: Learn the Basics of Apex, Lightning Web Components, and Flow. Berkeley, CA: Apress, 2024. 179-195.

[7] Fronden, Chuse. "Implementing Salesforce Custom Base Lightning Web Components to increase consistency." (2022).

[8] Guduru, Venkat Sumanth. "DESIGNING SALESFORCE LIGHTNING COMPONENTS FOR ENHANCED USER EXPERIENCE." Technology (IJCET) 11.5 (2020): 38-45.

[9] Palleti, Pavan. "Modernizing UI Development: Performance and Productivity Gains with Lightning Web Components." Journal of Scientific and Engineering Research 6.6 (2019): 248-251.

[10] Kapitanov, Konstantin. Salesforce Developer I Certification: Learn the Basics of Apex, Lightning Web Components, and Flow. Springer Nature, 2024.

[11] James, Oliver. "NEXT-GEN RED HAT PROVISIONING FRAMEWORK USING LWC DASHBOARDS." (2021).

[12] Sidorov, D. "Leveraging web components for scalable and maintainable development." Sciences of Europe 150 (2024): 87-89.

[13] Guduru, Venkat Sumanth. "MASTERING SALESFORCE CLASSIC TO LIGHTNING MIGRATION: A COMPLETE GUIDE."

[14] Smith, John. "ARCHITECTING SCALABLE CRM SYSTEMS USING MODULAR LIGHTNING WEB COMPONENTS." (2020).

[15] Aulakh, Manpreet. "Salesforce LWC Development in Hybrid Unix Systems with Copado, Git, and AI-Powered CI/CD Pipelines." (2022).

Downloads

Published

2025-03-28

Issue

Section

Articles

How to Cite

1.
Srigadde BR, Guntupalli B. Tracking the Status of Long-Running Apex Methods in LWC. IJERET [Internet]. 2025 Mar. 28 [cited 2026 Jun. 23];6(1):147-5. Available from: https://ijeret.org/index.php/ijeret/article/view/605