You need to sign in to do that
Don't have an account?
sdondeti
Finding open events and tasks of a Lead and closing them
Hi,
I got a requirement to close all the open events and tasks of a Lead when it reaches a specific status. I did some analysis and figured out that it is possible only with a trigger.
As to closing the Tasks, I queried Task object using "WhoId" field and set the Status to Completed which closed all the tasks of a Lead.
However for the events, I am not seeing a status field in the Event object. I was wondering how can we close the open events for a lead. Is it by setting the eventdate=currentdate Or any other mechanism?
Would appreciate your help.
Thanks
I got a requirement to close all the open events and tasks of a Lead when it reaches a specific status. I did some analysis and figured out that it is possible only with a trigger.
As to closing the Tasks, I queried Task object using "WhoId" field and set the Status to Completed which closed all the tasks of a Lead.
However for the events, I am not seeing a status field in the Event object. I was wondering how can we close the open events for a lead. Is it by setting the eventdate=currentdate Or any other mechanism?
Would appreciate your help.
Thanks
Best Answer chosen by sdondeti
pcon
That would be correct. Events are not like Tasks. Tasks have a status where an event is based on a given range of time. You can set the EndDateTime and the ActivityDateTime to now that should "close" out the Event.