0

I have to create the activity History record for workflow email alerts. I tried this way

  • Created another email alert with copy of same email template and appended ref:{!Lead.Id} in email template.
  • email alert is associated with same workflow.
  • got Email to Salesforce address from admin user and mentioned at BCC address in email alert.
  • Didn't mention any recipient as, the one who should be receipt is already being mentioned at 1st email alert.
  • getting the email in unresolved item.

OR

  • I tried first using single email alert while mentioning BCC address and ref:{!Lead.Id} in email template body(didn't created any new template), that was not creating even unresolved item email.

How to create correct Activity History for workflow email alert. I have read the many blogs mentioned same way, did i miss any thing in implementation. ?

4
  • Why not simply 'fix' the email template and workflow that's creating the problem for you to begin with that isn't creating the Activity History for you that's needed?
    – crmprogdev
    Mar 9, 2017 at 14:06
  • I used the exisitng workflow only. I tried first using single email alert while mentioning BCC address and ref:{!Lead.Id} in email template body, that was not creating even unresolved item email.
    – Ankuli
    Mar 9, 2017 at 14:07
  • There is a user setting to send everything to unresolved items, make sure that is off.
    – gorav
    Mar 9, 2017 at 21:59
  • @gorav : Yes that setting is off.
    – Ankuli
    Mar 10, 2017 at 7:37

1 Answer 1

1

It appears that you missed something either in your your template or email messaging method. From the Email Class (Base Email Methods), you need to use the following in your code:

setSaveAsActivity(saveAsActivity)

Optional. The default value is true, meaning the email is saved as an activity. This argument only applies if the recipient list is based on targetObjectId or targetObjectIds. If HTML email tracking is enabled for the organization, you will be able to track open rates.

Signature

public Void setSaveAsActivity(Boolean saveAsActivity)

Parameters

saveAsActivity

Type: Boolean

Return Value

Type: Void

4
  • I am not using any code. instead workflow email alert.
    – Ankuli
    Mar 10, 2017 at 6:06
  • Are you setting the WhatId to lead and the WhoId to the lead.Id in the template? Are you using the above in your workflow and creating an activity (closed) when sending the email?
    – crmprogdev
    Mar 10, 2017 at 14:59
  • I am using workflow on Lead object, which sends an email on record creation, for the same we want to have activity history record created under Lead. To acheive that I used 'Email to Salesforce address' in bcc area of email alert.
    – Ankuli
    Mar 10, 2017 at 15:03
  • Edit your template to include a WhatId = lead.id and WhoId=lead.Id. You can make the fields hidden if you need to. More important, you also need to change your workflow to also create a Task which you'll create as "closed". The Task will be to "send email". That's how to get this into your history. Unless you create the task to send the email, it won't appear in your history.
    – crmprogdev
    Mar 10, 2017 at 15:13

You must log in to answer this question.

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