Print this page

Process Builder: Update Related To record from Task or Event

Knowledge Article Number 000232292
Description Process Builder, when you create a Process for a Task or an Event, does not give you a direct way to update data on the record through the Related to (WhatID) or Name (WhoID) fields.

If your Activity is Related to a Case or Opportunity, or even your custom object, in most cases you will have these records related to an Account. For Name To, this will work for those Contacts that are related to an Account, since a Lead is not related to an Account, it will not work for Leads

This article will use this to your advantage to be able to update Cases, Opportunities, or your custom object, as long as those are related to an Account.

More information on how the Account field in the background of an Activity is calculated, can be found in this article:
How is the Account Id of an Activity calculated?

Developer reference:
SOAP API Developer Guide: Task
SOAP API Developer Guide: Event

An Idea exists on the IdeaExchange, to bring this functionality out of the box, please vote for it:
Allow Case to be Updated once a Task is Completed via the New Process Builder
Resolution
1. Open Process Builder; click on New
- set Name; API Name; Description and Save
2. Add Object; select either Task or Event
- choose when to start your Process; etc and Save
3. Add Criteria; set a Criteria Name; choose Conditions are met
- We need at least two conditions, first one, to see if the activity is related to a case
- Field: Related To ID; Operator: Starts with; Type: ID; Value: 500
- The second condition, checks whether an Account ID is present:
- Field: Account ID; Operator: Is null; Type: Boolean; Value: False
- Based on your use case, add further conditions, logic or advanced settings
- Save

User-added image
 
4. Add Action; Action Type; Update Records; set an Action Name
- Record Type; Select a record related to the Activity, Account ID >, Cases; Choose
- Criteria for Updating Records; Updated records meet all conditions
- Field: Case ID; Operator: Equals; Type: Reference; Value: Event, Related To ID; Choose
- Based on your use case, add further conditions, logic or advanced settings

User-added image
 
5. Set new field values for the records you update
- You can now choose any case field you would like to update, choose one, some and Save
6. After Saving, Activate and test your process

We recommend you to test in a Sandbox before deploying it to your Production environment to make sure it all works as expected.




promote demote