You need to sign in to do that
Don't have an account?
s_mac
Visual force edit page to be sent in email body
Hi,
I have a visual force page with two sections each section(with input fields) showing diff object fields,from this page,i am saving/creating records of two objects at a time,when i click on save a mail should be sent with the data on the page,or the visual force page with the data in email body.
Can somebody help how to achieve this...
Thanks in Advance...
I have a visual force page with two sections each section(with input fields) showing diff object fields,from this page,i am saving/creating records of two objects at a time,when i click on save a mail should be sent with the data on the page,or the visual force page with the data in email body.
Can somebody help how to achieve this...
Thanks in Advance...
You must have a custom controller to handle the saving of the two objects? So in that method use some of the SimpleEmailMessage stuff to fire out an e-mail:
of course, thinking about it - I hope you have a relationship between your two objects so you can reference their two fields on the same template...
Regarding doing that, once you have setup a "Visualforce" email template - you should be able to copy and paste your page into it, jiggle the inputs into outputs and resuse that code. That is suboptimal I admit, because you'd have to maintain both files, but I don't think you can just reuse the input form as an output for e-mail.
You might be able to use "getContentAs" to attach the original Visualforce page to an e-mail as a PDF? Might that work? Turning the inputs straight into outputs (or leaving them visually as inputs, but in a PDF it would just look like a form).
Is any of that any use?