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

Lightning Components pass parameter to controller function
Hi,
I'm currenty trying to master this use case:
Lets say we have an object and on the page we have the option to delete this object. Now the delete button gets clicked and a bootstrap modal pops up asking if this object really should be deleted. By clicking yes the object gets deleted.
My problem is to remember this clicked object so I know which one has to be deleted by clicking the modal yes button.
So in a nutshell ... how can I pass the object id to a component parameter when the delete button gets clicked?
Thank you!
I'm currenty trying to master this use case:
Lets say we have an object and on the page we have the option to delete this object. Now the delete button gets clicked and a bootstrap modal pops up asking if this object really should be deleted. By clicking yes the object gets deleted.
My problem is to remember this clicked object so I know which one has to be deleted by clicking the modal yes button.
So in a nutshell ... how can I pass the object id to a component parameter when the delete button gets clicked?
Thank you!
https://developer.salesforce.com/blogs/developer-relations/2015/03/lightning-components.html
It covers passing parameters. The example provided looks like this:
Why don't you try it like below?
https://developer.salesforce.com/forums/?id=906F0000000kAn0IAE
Please mark this as the right answer, if it solves your problem.
Thanks,
Rohit Alladi
In Component
In controller
Thanks.