You need to sign in to do that
Don't have an account?

How to Pass data from one Component to another
I have a component that display a listing of records. When clicking a button on that list, I am opening a second component. The first component will pass data to the first component to clone the record. What is the best way to do this? I think that I would need to use an event but then I saw some posts (that I could not fully understand) that talked about the concept of parent and child components.
I'm just trying to find the best way to open the second component and pre-populate values. The record will be saved and the user should be directed back to the original component.
thanks!!
Fred
I'm just trying to find the best way to open the second component and pre-populate values. The record will be saved and the user should be directed back to the original component.
thanks!!
Fred
The lightning:isUrlAddressable interface extends the lightning:hasPageReference interface. A component that implements lightning:isUrlAddressable then gets access to the page state through the pageReference attribute. The page state is a representation of the current URL query parameters.
Suppose
hellp.cmp
c__helloTarget.cmp
"recordId": component.get("v.record");
I don't have a "record" attribute on teh component so trying to figure out where this is coming from? I get an error that it does not exist. thanks!!
Fred
You can do two ways