function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dhanamjaya damaragunta 24dhanamjaya damaragunta 24 

How to Get Org Record Changes in Lightning Component

Hi Team,

I need to Display all open cases and all open Opportunities count on Lightning Home Page based on Record changes(for example When ever a new case is opened by any other User, Lightning  home page automatically needs to update with Open Cases Count).To achieve this I have implemented Streaming API with CometD.js in Classic Version.Can any one suggest how to do the same with Lightning component without using Comet.Js.

Thanks
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Dhanamjaya,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

http://sfdcfacts.com/platform/change-data-capture-events-in-salesforce-keep-your-ui-updated-with-latest-data/

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_handling_record_change.htm

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Raj VakatiRaj Vakati
These are the different ways you can do it 

1. Use Streaming API 

You can create a push topic and get the data changes using streaming api 

2. Platform events also will help you 

3. You can use Lightning Data Services 

4 .CHANGE DATA CAPTURE whihc not GA and i dnt think so this is right options 

 
dhanamjaya damaragunta 24dhanamjaya damaragunta 24
Hi Raj,
Can you please give some Samle code for Lightning Data services.I mean by using LDS how we can update home page based on any record changes in the org

Thanks
Dhanamjaya