none
EWS Managed API for Exchange_2007_SP1 - ServiceResponseException for Restrictions RRS feed

  • Question

  • Hello,

    I am using EWS Managed API for Exchange_2007_SP1 to query the Tasks. But while setting the property bag I am getting following exception,

    "microsoft.exchange.webservices.data.ServiceResponseException: The property can not be used with this type of restriction."

    This exception comes for all the properties available with "TaskSchema".

    Does anyone has any solution for this?

    Thanks in advance.

    regards,

    Mandar

    Wednesday, December 29, 2010 8:53 AM

Answers

All replies

  • With Exchange 2007 you can't create a restriction using the Task Strong Object Types you need to use the equivalent Extended property instead eg http://social.technet.microsoft.com/forums/en-us/exchangesvrdevelopment/thread/B1943C4B-9CBC-4C36-84BA-124A20C7C652

    Cheers
    Glen

    • Marked as answer by JGMandar Thursday, December 30, 2010 5:35 AM
    Thursday, December 30, 2010 2:19 AM
  • With Exchange 2007 you can't create a restriction using the Task Strong Object Types you need to use the equivalent Extended property instead eg http://social.technet.microsoft.com/forums/en-us/exchangesvrdevelopment/thread/B1943C4B-9CBC-4C36-84BA-124A20C7C652

    Cheers
    Glen

    Hello Glen,

    Thanks a lot for the information provided. It is really helpful. I could query the task using filter without any exception.

    But I have 2 doubts on this,

    1) While adding a task also we should add the extended properties ?

    2) What about the tasks created on exchange server using Outlook or any other client? As the task will not be added with extended property. I tried to read the tasks created by client on exchange server using java code but it does not return any task items.

    Please guide.

    Thanks in advance.

    regards,

    Mandar

     

     

    Thursday, December 30, 2010 5:48 AM
  • If you going to be doing any programing on Exchange especially with richer object type like tasks, appointments etc you should take some time to learn what mapi properties are http://msdn.microsoft.com/en-us/library/cc765570.aspx. Its hard to explain them simply but the strongly typed objects properties in EWS are just representations of the underlying object properties using the Extended mapi properties is just another way of reading the same property. You may want to look at reading a book such as Inside Exchange Web Services to get a full understanding of all this. I would suggest you also use a Mapi editor like Outlook Spy or MFCMapi to have a look at the available properties on a item.

    Cheers
    Glen

     

     

    Thursday, December 30, 2010 10:32 AM
  • If you going to be doing any programing on Exchange especially with richer object type like tasks, appointments etc you should take some time to learn what mapi properties are http://msdn.microsoft.com/en-us/library/cc765570.aspx . Its hard to explain them simply but the strongly typed objects properties in EWS are just representations of the underlying object properties using the Extended mapi properties is just another way of reading the same property. You may want to look at reading a book such as Inside Exchange Web Services to get a full understanding of all this. I would suggest you also use a Mapi editor like Outlook Spy or MFCMapi to have a look at the available properties on a item.

    Cheers
    Glen

     

     

    Hello Glen,

    Thanks a lot.

    I will look into it.

    Wish you a very Happy New Year!!!

    regards,

    Mandar

    Sunday, January 2, 2011 4:40 AM