0

I have lead, member and agreement objects, member has look-up to lead and agreement has Master-Detail(Partner) field.

I created visualforce email template to display fields information from agreement into it and send it to the partner.

Partner has email field with type email, how can I send the agreement email to partner email?

I created email template with VF

<messaging:emailTemplate subject="Agreement" 
                         recipientType="Lead" 
                         relatedToType="Agreement__c">
  <messaging:htmlEmailBody >
        <p>Dear {!recipient.lastname},</p>
        <p>Agreement Content:</p>
        <c:pTasks_Component agrId="{!relatedTo.Id}" />

    </messaging:htmlEmailBody>
</messaging:emailTemplate>

I created workflow rule on Agreement object Evaluated when a record is created with workflow action, but I can't choose partner email as a recipient.

3
  • If you already know to where send an email -- create field on agreement and populate it via trigger etc
    – kurunve
    Commented Feb 7, 2016 at 15:52
  • Is this the only way to do that? @kurunve Commented Feb 7, 2016 at 15:53
  • Unfortunately, I have no more ideas, @user3003810
    – kurunve
    Commented Feb 7, 2016 at 17:00

1 Answer 1

0

When you create a WF rule on some SObject S, only the email fields on S are available to set as the recipient. You will need to either

  1. change the WF to trigger off a DML event on Partner__c or
  2. to force via trigger or process builder, the value of the child partner's email into a new custom field on Agreement__c: sendToEmail__c of type Email.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .