You need to sign in to do that
Don't have an account?
Reparent Activity History
Hi All,
trying to re-parent all activityhisory on a contact to a lead, I have this working for all open tasks and events but not for activity history.
I was hoping to use something as follows but its clearly not right.
{
//move Taskhistory
List<Task> TaskHistory = new List <Task>();
{For(Task TH:[select (SELECT id, WhoID from ActivityHistories) FROM CONTACT where ID = :C.Id])
{
TH.WhoID = L.Id;
TaskHistory.add(TH);
}
Update TaskHistory;
System.debug('Success');
}
}
This is my first try at this after taks I want to move all historic events as well.
Any help greatly apreciated.
Sorry to bump but any help would be great.