You need to sign in to do that
Don't have an account?
Help making a simple controller for a Visualforce email
Hi. Fingers crossed this is simple.
I've made an email, it uses Account as the RelatedToType as it needs to source information from Contacts and Contracts. I had been using a Repeater to pull information from Contracts with a row limit of 1. What has transpired is that I cannot control the order in which information returns from the Repeater. I need the latest record, it will return whatever it has decided to pull back.
The result is that I need a controller to pull Contract information. This, right here, is where I am asking you for help. I haven't got a clue.
It's not overly complex I would assume, just the latest related Contract record to the Account, and then a bit of guidance on how I replace the references to the repeater with the controller.
Thanks!
I've made an email, it uses Account as the RelatedToType as it needs to source information from Contacts and Contracts. I had been using a Repeater to pull information from Contracts with a row limit of 1. What has transpired is that I cannot control the order in which information returns from the Repeater. I need the latest record, it will return whatever it has decided to pull back.
The result is that I need a controller to pull Contract information. This, right here, is where I am asking you for help. I haven't got a clue.
It's not overly complex I would assume, just the latest related Contract record to the Account, and then a bit of guidance on how I replace the references to the repeater with the controller.
Thanks!
you can refer the sample here
https://www.salesforce.com/us/developer/docs/pages/Content/pages_email_templates_with_apex.htm
1) Apex to query desirable object
2) VFpage to display object results in table
3) Refer to VFpage to pull in data to email
Sound right?