You need to sign in to do that
Don't have an account?
diwakar rajput
can i save the record of a form using another component button click
i have a modal in lightning. In this Modal i have a header , body and fotter . In body i am using a component for input data form and In footer I am using another component for save button. now I want to save record onclick of footer button.can i do this?
please help me
Thanks
please help me
Thanks
It is possible, but you need to use Lightning Event.
Thanks,
Nabeel KT
You can achieve this by referencing the controller method of the body to the footer button onclick, assuming if you are using lightning:overlayLibrary (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_lightning_overlayLibrary.htm) once you have created the body component dynamically from the place you creating the modal and if its reference is bodyComp then you can do something similar to what has shown below. You get can get the reference of the controller method named "saveMyrecord" and bind it with footer action. If you are using something else for your modal you can still use the same principle of binding the body's controller method reference to the onclick of the footer button save.