Im trying to update the organiser of an appointment within a plugin and cant seem to figure out how. I want to set the organiser equal to the owner so that the appointment will sync with the outlook calendar for the owner, but i need to set the organiser because thats whos calendar the appointment appears on.
Sounds simple, but i dont appear to be able to.....My code looks like this
ActivityParty ap = new ActivityParty();
ap.PartyId = new EntityReference(SystemUser.EntityLogicalName, ownerguid);
ap.participationtype = new optionsetvalue(7);
EntityCollection ec = new EntityCollection();
ec.Entities.Add(ap);
appointment.Attributes["Organizer"] = ac;
It doesnt error but it doesnt change the organizer either. I read a post that said you need to use prevalidation and reschedule or book for the plugin setup, but i am unable to select reschedule in the plugin registration tool, i click update and it doesnt do anything. I have also tried slight changes in syntax, however if i customise the form to allow the organiser to be editable in the UI form, i can change it on the UI form no problem,
I have also tried using the bookrequest object, but it tries to make a new appointment, which isnt what i want, i want to update the existing one, any ideas??
Thanks in advance