You need to sign in to do that
Don't have an account?

Write a trigger :
1) Make two DateTime fields on contact object.
LastTaskCreatedTime
LastEmailSentTime
2) Whenever a task is created on Contact LastTaskCreatedTime field should be updated.
3) Whenever you send an email LastEmailSentTime field should be updated.
4) Make trigger as bulk
LastTaskCreatedTime
LastEmailSentTime
2) Whenever a task is created on Contact LastTaskCreatedTime field should be updated.
3) Whenever you send an email LastEmailSentTime field should be updated.
4) Make trigger as bulk
This is not a place to get your work done. This is a place to get help for the thnings that you need. To give a help you should post the material/code you tried.

++Ruwantha
Please try below code
Let me know if this will help you