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

Trigger to pull the open activity from Leads.
I want to implement a trigger to scan the activities and check whoid to see if it is a lead. if not ignore it
and if it is alead i want to pull the next activity date of every lead and display it lead detail page by creating
a field something like Next open Activity Date or Earliest Activity Date.
Any help will be highly appreciated.
Thank you.
lead lead = new Lead(Id = event.WhoId);
and set your Next activity date like
lead.NextActivityDate__c = event.ActivityDate.
update lead.