You need to sign in to do that
Don't have an account?
edukondalu thodeti
how to get the id from the child component to parent component when click on the record name in the child component
Hi
pls help me
when i click on the name of the child component record i need to get the id of that record in the parent component
pls help me
when i click on the name of the child component record i need to get the id of that record in the parent component
To communicate or to pass information from one component to another you will have to use events, below are links for few scenarios:
>> https://medium.com/@amster/understanding-lightning-components-events-naming-and-parameters-297db051af79
Links to Documentation are below:
>> https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/intro_events.htm
>> Component Event : https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component.htm
>> Application Event : https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_application.htm
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.
Thanks.
1. Recommended way is to communicate between parent/child components is via events.
2. Provide a callable method in the child component call that function from the parent:
for sample code, see below references
https://salesforce.stackexchange.com/questions/97290/how-to-get-parent-lightning-components-attribute-in-child-component
https://salesforce.stackexchange.com/questions/246002/how-to-access-auraid-of-a-tag-present-in-child-component-in-a-parent-component