0

I have an aura component that has a few record edit form states and this needs to change when the stage field is changed when it is saved manually. How to achieve this?

In other words I want to call doinit function when a field is saved from standard record detail page area.

I am not trying to refresh detail page data from the component but rather the opposite.

1 Answer 1

0

When you use Lightning Data Service, They are raective in nature. Any change on the record gets reflected automatically. In case your component is complicated and it is not happening, You can go for change data capture in Aura components.

As per docs,

The lightning:empApi component provides access to methods for subscribing to a streaming channel and listening to event messages. All streaming channels are supported, including channels for platform events, PushTopic events, generic events, and Change Data Capture events. The lightning:empApi component uses a shared CometD connection, enabling you to run multiple streaming apps in a single browser session. The connection is not shared among multiple user sessions.

You can refire your desired method whenever standard field changes.

1
  • Thanks! I was able to do this with Platform Events. 1. Created a platform event 2. Created a flow to create the same platform event records 3. Created channel listener in aura component doinit using lightning:empApi
    – Akash
    Jan 9, 2023 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .