+ Start a Discussion
laxmi narayan 11laxmi narayan 11 

Onclick lightning Button

Hi there,

I want to make a custom lightning button on account object for send email to account email address.
Case: when i open a record and click on this lightning button, email send to this account record.

Rounak SharmaRounak Sharma

hello Laxmi narayan,
You can have a method (@AuraEnabled)sending email 
You have to query the logged in user and in the place of emailId you have to specify user.email 
call this method on click of the lightning button

Please let me know if you need any help

laxmi narayan 11laxmi narayan 11
Hi Rounak,

I put (@AuraEnabled) in my apex class already.
Now, my case is that I have a Vf page for a contract, which is every time different for a new record. I need a custom lightning Button on Account object, by which i can send this contract to account record by clicking on this button.