This post is inspired by Tunde, a fellow reader, who asked a question on another post titled Advanced Lead Conversion with Process Builder. Tunde wanted to know how to update a Lead’s related Tasks during conversion. Their solution worked fine for when the Lead is being edited but was having no effect when the Lead became converted.

tunde_question_how_to_update_leads_tasks_on_convert

You might think that this could be achieved with a simple Update Records action using Process Builder. Whenever the Lead is being edited and its IsConverted field became TRUE then update related Tasks. Your process might have looked like this:

pb_update_lead_tasks1

pb_update_lead_tasks2.png

And 99% of the time you’d be right… except when the Lead is being converted into an Account and Contact.

Dude, where’s my related list?

dude_wheres_my_related_list.png

As we discussed in my other post, Preserve Related Lists and Chatter on Lead Conversion, we learned that standard related lists are handled for us during conversion but custom related lists we have to move ourselves. Tasks and Activities are standard related lists, so they have already been handled for us when a Lead is being converted. By the time the Lead record is being handled by Process Builder, the Tasks and Activities records have already been re-parented to the converted Contact record. Their WhoId references the [Lead].ConvertedContactId now, not [Lead].Id.

Solution

Since the Tasks and Activities records have been re-parented to the converted Contact, what we need to do is modify our Process Builder to launch a Flow with one Record Update element in it to update the desired Tasks where their WhoId equals the Lead.ConvertedContactId.

pb_update_lead_tasks3