How to assign Tasks to other users using Exchange Web Service.
How to assign Tasks to other users using Exchange Web Service.
Any workaround also would help
April 30th, 2013 7:41am

Assigning tasks like you can do in Outlook is not supported in any version of EWS on Exchange and its not a feature that has ever been supported in OWA. The only workaround is to use MAPI via the OOM or Redemption. One thing you can do in EWS if you have rights to the user you want to delegate the task to is just create a Task in their mailbox directly.

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2013 9:40am

Hi Glen,

I am trying to use ExtendedPropertyType and put in UpdaterItemType as in this code as below. Although it is not updating the Owner field.

I have tried it both by Propertyname and PropertyID. Although new custom property's canbe added but to change an existing one like 'Owner' ? Would this be the right method.

2. And Is ProprertyID a fixed value as 0x811f or does it need to be calculated.

3. Is 'Owner' the right propertname for assigning a task ?

Thanks a lot.

Please see code below for reference.

 PathToExtendedFieldType pathExtended = new PathToExtendedFieldType();
            //pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
            pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.Task;
            pathExtended.DistinguishedPropertySetIdSpecified = true;
            pathExtended.PropertyId = 0x811f;
            pathExtended.PropertyIdSpecified = true;
            //pathExtended.PropertyName = "Owner";
            pathExtended.PropertyType = MapiPropertyTypeType.String;


            ciSetAT.ExtendedProperty = new ExtendedPropertyType[1];
            ciSetAT.ExtendedProperty[0] = new ExtendedPropertyType();
            ciSetAT.ExtendedProperty[0].ExtendedFieldURI = pathExtended;
            ciSetAT.ExtendedProperty[0].Item = "chen@abc.com";

            SetItemFieldType set1 = new SetItemFieldType();
            set1.Item = pathExtended;
            set1.Item1 = ciSetAT;

            UpdateItemType request = new UpdateItemType();
            request.ItemChanges = new ItemChangeType[1] { new ItemChangeType() };
            request.ItemChanges[0].Item = itemId;
            request.ItemChanges[0].Updates = new ItemChangeDescriptionType[2];
            request.ItemChanges[0].Updates[0] = setstart;
            request.ItemChanges[0].Updates[1] = set1;


February 6th, 2015 7:38pm

Before writing any EWS code my suggestion would be that you trying changing whatever properties you believe will work with a MAPI editor like OutlookSpy or MFCMapi. As I said previously assigning tasks isn't supported in EWS (I don't have any workaround for this) so you may find even with MAPI some of the properties that need to be set can only be set before the Item in created (if you find a property you can't set in Exchange copy the item out as a MSG file and then try modifying the properties again if you can set them outside of Exchange try then copying the item back in and see if it works). Also the other major problem with task assignment is to create a Task assignment email you need to generate an Ole attachment which is also not supported in EWS https://msdn.microsoft.com/en-us/library/ee219819(v=exchg.80).aspx . My suggestion would be to use MAPI via redemption http://www.dimastr.com/redemption/RDOTaskItem.htm its just a few lines of code and will work on any version of Exchange including O365.

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
February 8th, 2015 10:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics