2

I have created an Activated workflow rule that says if a Task's subject contains 'Email:' update the record type field.

However, after performing several bcc to email tests, this is not working correctly. I even tried operating off of several different field conditions (task comments) but to no avail.

Googling around suggests Salesforce has limited capability in this area, but is there a solution to field updating on a Task record type?

1
  • 1
    I got a similar requirement, where we have to differentiate between call log, tasks and email. All three are stored under tasks. The only solution we have is a to create separate custom button for each of these, we are autopopulating the Task type field. you can do the same for recordtype
    – C0DEPirate
    Mar 25, 2016 at 11:32

1 Answer 1

2

Generally speaking, the most reliable way to do this, will be with an AfterInsert trigger. That's how I've most frequently seen this type of task (no pun intended) performed.

2
  • Thanks for the tip! If I am specifically trying to field update for an 'Email Task' record type, is the trigger type AfterInsert and AfterUpdate as well?
    – GPP
    Apr 3, 2016 at 7:42
  • Unless you expect your conditions to get edited to meet your criteria, then I would only make it an AfterInsert. That having been said, there's no harm in making it an AfterUpdate too. Just be certain to filter your records so the the trigger doesn't update records more than once and use a boolean to prevent recursion if there's any workflow that would cause it to execute a 2nd time in the same execution context (see trigger order of execution in Apex Code Dev Guide).
    – crmprogdev
    Apr 3, 2016 at 12:56

You must log in to answer this question.

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