In Detail-record page, where you can see (activityTracking page and related list) and on header of the page there is new case button to create a new case record.
I have an activityTracking page(lightning component) that display a Child object activity (Tracking of record page)details. Whenever detail page is opened, it automatically retrieve the record ID of that detail page and display those records(Activity) in activity component.
Instead of doing manual refresh, I want it to auto refresh the activityTracking page(lightning component) to view the case record by using NEW CASE button.
ActivityTrackingPage is a lightning component, where I need to write a code for auto refresh process.
Need suggestion please….
Best Answer
The only reasonable route I see here, if the process for creating a Case is not under your control, is for your Lightning component to embed the
<lightning:empApi>
event streaming service.You can then either
empApi
component subscribes.Your JavaScript callback from the empApi component can then take action to refresh your activity view upon receipt of one of those events.
The only other feasible solutions I see are:
<force:recordData>
to watch for change events in the parent object's roll up field, representing creation events for the child object. I think it's unlikely that that applies here.