You need to sign in to do that
Don't have an account?
Michelle Arndt
Trigger on custom object tasks
I would like for a field "contacted last 90 days" to be checked if an activity has been performed in that time frame and to uncheck if 90 days has lapsed. If a user hits the log a call or send an email under the activity history is it possible to do this with a trigger since it can't be done with a workflow?
1 a trigger on task that will update the field
2 a scheduled apex that will query your custom recordswhere the field is true and then see if the related tasks were performed in the last 90 days. You would schedule it to run on daily basis or during idfferent intervals based on your need
For trigger
for scheudled jobs you can learn more using this trailhead
https://developer.salesforce.com/trailhead/asynchronous_apex/async_apex_scheduled