You need to sign in to do that
Don't have an account?
Complex SalesForce process - need help on where to get started
Hey guys,
I have to work on the following project:
An external button calls a REST Webservice and sends an ID. This ID is the trail to the user which called the button. Now I need to generate a .pdf with the user information. This .pdf then needs to be send to three different e-mail addresses, of which one has a different body. All of this needs to be done programmatically, so that the user only presses a button, and the rest is done automatically.
I found a huge documentation about REST Webservice, so I don't need a start here. But I can't find a documentation on how to generate a .pdf all by code and send this via email. All I could find is .pdf in combination with a visualforce page. Does someone have a nice tutorial on generating a .pdf by code only and sending it via mail?
Thanks in advance!
Take a look at below link,
http://www.salesforce.com/docs/developer/pages/Content/pages_email_sending_attachments.htm
All you need is a visualforce page rendered as pdf which has the visual content, a class which gets the pdf content creates and attachement and uses singleemailmessage class to send out the email.
Hope it helps.,
Thanks,
Balaji
All Answers
Take a look at below link,
http://www.salesforce.com/docs/developer/pages/Content/pages_email_sending_attachments.htm
All you need is a visualforce page rendered as pdf which has the visual content, a class which gets the pdf content creates and attachement and uses singleemailmessage class to send out the email.
Hope it helps.,
Thanks,
Balaji
Are you asking, instead of having the same content on page every time, it should be changed based on input or some params? The answer is yes, it is just a visual force page rendered as pdf, so you can control what to show up or what to hide on page at the time of generation using a controller for the pdf page. The example is just to demo how it works, you can have a controller written to that page which controlls the logic and content of page.
Did it clarify your quesiton?
Regards,
balaji
I hope we are one the same level. The page where the button is being called is not a visualforce page. This button just calls a webservice.
Everything after that button is being clicked, should happen programmatically, so that the user doesn't have to do anything and there are just 3 mails send with the generated .pdf attachment.
Is this possible with what you suggested?
Thank you really much for your time!
Cheers,
Just go for it! if you are stuck with some thing, reply to same thread, I will definitely try to help you out!
Thanks,
balaji