3

I've set up a workflow rule to update the activity TYPE field based on the subject of the email.

AND(
    BEGINS(Subject, "Email: Fwd:"),
    ISPICKVAL(Type, "4. Email Out"),
    NOT(ISBLANK(WhoId))
)

Basically the workflow rule says...

IF...
Subject --> Starts With --> "Email:FWD"
THEN...
Update TYPE to "Email:In"

The Problem:

Problem is that when using the BCC-to-Salesforce to track the email, the workflow rule will not trigger. The workflow logic is correct, because if I EDIT and then SAVE the record the workflow will then trigger and update accordingly.

Anyone have any ideas on what's happening, or a work around?

1
  • I am able to reproduce this issue exactly as you describe it. Frustrating! Have you gotten to the bottom of this one yet? Would love any suggestions if you have any. Commented Oct 13, 2014 at 17:26

3 Answers 3

0

It was to do with the fact that WFR cannot teigger another WFR.

Instead I wrote an apex trigger. I can share with u later...but I am at dreamforce atm :)

1
  • 1
    Do please update your answer to explain more. Commented Oct 14, 2014 at 19:36
0

I ran into this and ended up getting it figured out, so I will share what I found in case someone else gets stuck on this when writing a trigger.

The issue was when the email was being saved through BCC it did not have the WhoId populated. Looked through the Trigger Order of Execution Documentation but couldn't exactly determine why this was happening. The logic was firing on both after insert and after update.

I moved my trigger to @future method and everything functions correctly now. This workaround worked for me but ensure your trigger is bulkified before dumping it into a @future method.

0

Have you tried a Process Builder on EmailMessage object? That object has an ActivityId field of the related Task you want to update.

If Process Builder "Update Records" action doesn't let you update the related Task then launch a Flow passing in the [EmailMessage].ActivityId as input variable then do an "Update Record" step in the Flow.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_emailmessage.htm

You must log in to answer this question.

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