How can I check a box if a record has an open activity? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kieron HeathKieron Heath 

How can I check a box if a record has an open activity?

I would like to check a box if an open activity is present on a record. This would be used to flag in a List View that there is an open activity.

It would also be good for then uncheck the box once the tasks has been completed.

I suspect there's some fancy formula I can put into Process Builder?

Thanks in advance.
Best Answer chosen by Kieron Heath
Srinivasa RayapuriSrinivasa Rayapuri
Hi Kieron

You can achieve this by using the process builder individually on Task and Events object. I am poting how to on Task Object

Created a new field on Account called "Open Tasks" of type checkbox (The reason is I want to separate open Events by creating Open events checkbox an then use these two in list views)
User-added image

Process builder on Tasks with When a record is created or Edited
User-added image



Evaluation criteria as below and I am checking for open tasks
User-added image



Immediate action field update Action Type : Update Record Action Record Type: Select a record related to Task Account Id 
User-added image


And finally the field update
User-added image




SAVE AND ACTIVATE AND DO THE SAME FOR EVENTS

 

All Answers

Srinivasa RayapuriSrinivasa Rayapuri
Hi Kieron

You can achieve this by using the process builder individually on Task and Events object. I am poting how to on Task Object

Created a new field on Account called "Open Tasks" of type checkbox (The reason is I want to separate open Events by creating Open events checkbox an then use these two in list views)
User-added image

Process builder on Tasks with When a record is created or Edited
User-added image



Evaluation criteria as below and I am checking for open tasks
User-added image



Immediate action field update Action Type : Update Record Action Record Type: Select a record related to Task Account Id 
User-added image


And finally the field update
User-added image




SAVE AND ACTIVATE AND DO THE SAME FOR EVENTS

 
This was selected as the best answer
Kieron HeathKieron Heath
That's great - totally worked.

I took it one step further in the False branch I did the same but when a task is completed, it then unticks the box.

Great way to highlight in list views whether there is a task set.

Thanks for the advice.
Srinivasa RayapuriSrinivasa Rayapuri
That's Perfect Kieron.
Glad to be of help
Shradha PillayShradha Pillay
Hi Srinivasa,

Do you know how can I achieve this for multiple Task open.
Martin TruhanMartin Truhan
This is very helpful folks, however I have similar concern as Sharnha Pillay above - for multiple tasks this solution is limited. If anyone has a trick kindly share. I need a checkbox / flag to be TRUE when number of open tasks is greater or equals 1 :) Thanks!
instagram takipciinstagram takipci
Very efficiently written information. It will be beneficial to anybody who utilizes it, including me.
 THANKS.
hiace cheap (https://carused.jp/car-list/toyota/hiace-van)