What do I want to achieve? We do product demos with our potential Customers ( = Leads) and my sales reps should be notified, if they forgot to add some follow up tasks to the lead. The demos are saved es events with a dedicated start- and enddate. One day after the event is done (no task completion here!), salesforce needs to check the lead for any open tasks and sends the lead owner a reminder (email), if there are no open tasks.

Before I actually ask for specific Apex code, I'm looking for suggestion how to implement this. I was thinking about two processes; the first one triggers when the demo-event is created and calls the second one one day after the EndDate of the demo-event. The second one evaluates, if the Lead "needs" an reminder and sends out a defined E-Mail notification.

However: I struggle with the "evaluation" step because there seems to be no formula available to check for "open tasks" or something equivalent.

My question: How would I implement the evaluation for open tasks? Do I need Apex for that or am I missing something in the formulas or evaluation criteria for processes?

1 Answer 1


You can query open tasks with SOQL like below if you want to use apex.

select id , name ,  (SELECT Id, Status, FROM Tasks WHERE Status!='Completed') from Lead where id = : LeadId

You must log in to answer this question.

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