02-17-2011 07:38 PM
Does anyone know how does one change the "Scheduled For" of an ACT! Activity programmatically?
There appears to be no field or method that allows the modification of the Scheduled For on an activity. What am I missing?
I just want to change the Scheduled For from one user to another.
Any clues?
Thank you in advance.
T
02-18-2011 06:09 AM
The organizer for an activity is whom it is scheduled for, the activity contacts are those whom the activity is scheduled with.
02-18-2011 11:44 AM
I know that. However, what I want is to change with whom the activity is Scheduled For. Like on the ACT! interface where you can choose the contact to Schedule For .
Anybody have any code on this?
T
02-18-2011 12:20 PM
Maybe I don't understand the question.
If you change who the activity organizer is, it changes who the activity is ScheduledFor. They are one in the same.
02-18-2011 12:55 PM
I looked at the Activity object and I don't see any call to set the Organizer. I guess the question is:
What code is needed to change an activity's organizer?
T
02-18-2011 01:36 PM
This does it for a newly created activity, I'm farily certain you can set the organizer the same way for an existing activity:
User[] users = ActApp.ActFramework.Users.ActiveUsers;
CalendarDelegateGrantor cdg = ActApp.ActFramework.CalendarDelegates.GetCalendarDelegateGrantorByAccessorId(users[users.Length - 1].ID);
ActivityTemplate newActivity = ActApp.ActFramework.Activities.CreateActivity(StandardActivityType.Meeting);
newActivity.ActivityContacts.Add(contact);
newActivity.Regarding = "SDK TEST";
newActivity.StartTime = startTime;
newActivity.EndTime = endTime;
newActivity.Details = " ";
newActivity.Organizer = cdg;
newActivity.IsAlarmed = true;
newActivity.LeadMinutes = 10;
newActivity.Update();
02-18-2011 01:48 PM
Matt,
THANX A LOT. THAT HELPS
11-11-2015 12:47 PM
BTW.
This worked great on previous version of Act!. With Act! 17.2, this does not work. So if, for example, John schedules for Patrick, the organizer is still John.
Any clues on how to work around this?
T