You need to sign in to do that
Don't have an account?
KVaishna
Opportuinty Id in email template merge fields from Apex
Hi
How to pass Opportunity Id to email Template merge fields from Apex Class when you set TargetObjectId as User Id and not Contact Id.
Whatid option work with Contact record and not with User record.
sample code is given below:
mail.setToAddresses(toAddresses);
mail.setTargetObjectId(account.Owner.Id);
mail.setWhatId(opp.Id);
mail.setTemplateId('00XQ0000000Dcru');
Thanks
- Kunjan