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

associating event with lead(Activity history)…?
I am inserting events and inserting multiple invitees(Lead/Contacts) to event using EventRelation.
EventRealtion er = new EventRelation(EventId = '00UD0000005zijH', RelationId = '003D000000Q8adV'); insert er;
problem is when i add invitees using event relation...they dont associate it with lead/contact as event in activity history..they only associate when i put whoid in that event.then it associates automatically...but we can add only 1 whoid to an event..
How can i associate lead with events...can someone provide me a solution for the same..??? any help will be appreciated..
Hello Mike,
If the Start Time of the event has yet to occur, the event will be listed within the record's Open Activities related list. Once the event starts (actual time of day within the application equals Start Time of the event), the event record will move from the Open Activities related list to the Activity History related list.
Example: An event has a Start Time of 9 am, an End Time of 11 am the same day, and it's related to a contact. The event record under the contact's Open Activities related list will move to the contact's Activity History related list at 9 am the day of the event.
Note: The Start Time is the only trigger to move the event from one related list to another. It's not based on Start and End Time or End Time alone.
Thanks Vinita for your reply.
I know what you saying...but my problem is when i am inserting multiple invitees using event relation..it is not associating itself with lead/contacts in open activities/activity history.
Its associating itself only when i insert any lead/contact in whoid of an event but not when i insert using event relation object.
Did you understand what i am saying..???