Skip to main content
Hi i am having a custom button,which when clicked generates the PDF and saves it in attachment.

Now i am trying to make it as email too.

so when the custom button is clicked,generate pdf ,save the pdf to attachment and email it to particular user email.

How can i do it?Can i do it on single button?Or do i need two buttons. 1 .generate and save

2.email pdf?

I am confused and struck here .I am able to generate it and save as attachment.

But i want all three steps(generate,save and email) in single button.Please help.

Thanks in advance.
답변 12개
  1. 2017년 12월 21일 오전 12:01
    Biren - 

    If you are calling this webservice class from a Visualforce button, then if you know a decent amount of Javascript, then you may be able to pop an input box and send the value of the input to the method call.  You will need to add an additional parameter to the webservice method representing the email address in order to utilize it within the code. Best of luck to you.  It seems like my answer is helping you, so please feel free to mark as 'Best Answer'.  Thanks!