none
Using DeleteItemType: error "The specified object was not found in the store., The process failed to get the correct properties." RRS feed

  • Question

  • Hi,

    I am using "ExchangeServiceBinding" for creating Outlook Events.

    Events have been successfully created using the method CreateItemResponseType, but I am getting the below error while deleting the above created event using DeleteItemType.

    DeleteItemType Error: "The specified object was not found in the store., The process failed to get the correct properties."

    My Code:

    static ExchangeServiceBinding esb = new ExchangeServiceBinding();
                    esb.Url = ConfigurationManager.AppSettings["EWSEndPoint"];
                    esb.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["EWSUserID"], ConfigurationManager.AppSettings["EWSPassword"], ConfigurationManager.AppSettings["EWSDomain"]);

                    DeleteItemType dit = new DeleteItemType();
                    dit.ItemIds = new BaseItemIdType[1];
                    ItemIdType itemId = new ItemIdType();
                    itemId.Id = "AAAVAEFiZHVsLkFsZWVtQGVmZmVtLmNvbQBGAAAAAABQsZdhLcaxRYGYWXAU04YLBwAuJWVlmt6JS6Br2B95OhmHAAAA1u+UAAAvwxBRgZgpR6cwWZ+llXaHAAEg617fAAA=";               
                    dit.DeleteType = DisposalType.MoveToDeletedItems;
                    dit.SendMeetingCancellations = CalendarItemCreateOrDeleteOperationType.SendOnlyToAll;
                    dit.SendMeetingCancellationsSpecified = true;
                   
                    dit.ItemIds[0] = itemId;

                    DeleteItemResponseType diResponse = esb.DeleteItem(dit);

    Thanks

    Abdul Aleem

    Tuesday, October 4, 2016 10:52 AM

All replies

  • Hi Abdul Aleem 2017,

    This is the forum to discuss questions and feedback for Developing Apps for Office 2013, I'll move your question to the MSDN forum for Exchange Server Development

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=exchangesvrdevelopment

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, 
    and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thanks for your understanding.
    Wednesday, October 5, 2016 5:30 AM
  • The first thing I would suggest is you do a GetItem on the ItemId you are trying to use to first to confirm that Item actually exists and that you have permission to access it (ewsId's can change for a number of reasons). I would also check the permissions that the account your trying to use has on the Mailbox your trying to access it maybe that you don't have rights to delete items in the folder, the errors that EWS gives at times can be confusing. The other thing you can do to test is use the EWSEditor https://ewseditor.codeplex.com/ and try doing a delete that way which will let you confirm things work outside of your code with EWS.

    Cheers
    Glen

    Thursday, October 6, 2016 1:12 AM
  • Hi Glen

    Thanks for your response.

    I have noticed one point, that every time when I create an appointment using "CreateItemType".

    It returned me same below Item ID "AAAVAEFiZHVsLkFsZWVtQGVmZmVtLmNvbQBGAAAAAABQsZdhLcaxRYGYWXAU04YLBwAuJWVlmt6JS6Br2B95OhmHAAAA1u+UAAAvwxBRgZgpR6cwWZ+llXaHAAEg617fAAA="

    I think how I am retrieving ItemId was wrong, Can you please tell me how to get ItemId correctly.

    Also I searched in google but not fining it correctly.

    @David Jun Feng: Thanks for moving this forum for Exchange Server Development.

    Thanks

    Abdul Aleem

    Thursday, October 6, 2016 2:37 PM
  • You should post the code your using it sounds to me that your getting the FolderId rather then the ItemId if its the same each time you create an Item. If you post the code your using then somebody can help you fix that side of it.

    Cheers
    Glen

    Friday, October 7, 2016 2:53 AM