2 Antworten
Hi Sonam, thanks. I was working in the production system b/c I've done a lot of this kind of work and didn't anticipate any problems. Oh well. What I've since learned is that the test can work perfectly even when the live version doesn't. It's because you manually select the recipient and opportunity records. In the live version, workflow email alerts can ONLY be sent to email addresses IN THE OBJECT that triggers the workflow. Since we don't have email addresses in Opportunities (at the moment, we don't even have Contacts in opportunities except via Oppty Contact Roles), there's no address to send it to. And because the template is based on Oppty Contact Roles but the workflow is based on Oppty (you can't create a workflow on Oppty Contact Roles), it basically fails completely.I've gotten it to work by testing with a custom email field in Opportunities for both email address and lookup to Contacts. My solution will probably be to for the users to enter a Primary Contact for at least certain Opportunities and then use a workflow field update OR some apex code to populate an email address for that Contact in Opportunities. If I can get that to work, it will suit our needs.