You need to sign in to do that
Don't have an account?
Passing custom object reference to email template
hello friends,
I have an email template with an attachment(rendered in PDF),the attachment has reference to values from multiple standard objects like contact,oppurtunity etc.so what i have done to address this is to create a custom object,which is having all the needed fields from the standard objects.in the apex code then using the standard api Messaging.SingleEmailMessage,i use the method setTargetObjectId to set the cutom object and also the email template has the field relatedToType referencing this custom object,so that i can reference in the attachment,is this the right approach.
regards
hegdek