none
How can we know which calendar meeting is deleted from EWS managed api RRS feed

  • Question

  • I am using lastest version of EWS managed api and i am using extended property to set GUID for every meeting.

    What i was trying to achieve was to look into delete items and get all GUIDs so that i can search into my database to find the matching GUID so that i can remove it from database.

    So where i should look to get the cancelled meeting? and how can i search for them?

    Is there any other way to know which meeting is cancelled.

    Thursday, July 7, 2016 11:31 AM

Answers

  • You should be doing two thing first include your Extended property in the Property set you using in the FindItem request which will make it available in the results 

    eg add it into

     view.PropertySet = new PropertySet(Meetingpropertydefinition, ItemSchema.Subject, ItemSchema.ItemClass);
    ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
    view.PropertySet.Add(BlahProp)

    Or if you want to find an Item that matches a particular property value create a Searchfilter using an IsEqual Eg

     ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
     SearchFilter sf = new SearchFilter.IsEqualTo(BlahProp, "Value232");

    If you just want to list items where your particular property is set use an Exists filter eg

    ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
    SearchFilter sf = new SearchFilter.Exists(BlahProp);

    Cheers
    Glen

     

    • Marked as answer by Rahul_varma Tuesday, July 12, 2016 11:17 AM
    Monday, July 11, 2016 2:35 AM

All replies

  • A cancelled meeting is the same as any other deleted Mailbox Item and will be stored in the same retention or DeletedItem folder depending on how it was cancelled. The only thing different is there maybe a Cancellation notification that is sent to attendees, the problem is how different client implement meeting cancelation can differ (even user behaviour can differ some choose to send a cancelation and some don't). At some point if your syncing a calendar you need to reconcile the items you have synced. For a recurring appointments you may exceptions and deleted exceptions etc .

    Cheers
    Glen

    Friday, July 8, 2016 2:39 AM
  • Hello Glen,

    So is it possible to get Guid of cancelled meeting from deleteitems folder.

    This is the code i was using, but dont know where to querry for extended property. Right now i was retrieving all the mail which have canceled as their subject.

    Please suggest a solution

      List<SearchFilter> searchFilterCollection = new List<SearchFilter>();
    			searchFilterCollection.Add(new SearchFilter.ContainsSubstring(ItemSchema.Subject, "Canceled"));
    
    			
                // Create the search filter with a logical operator and your search parameters.
                SearchFilter searchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or, searchFilterCollection.ToArray());
    
                // Limit the view to 50 items.
                ItemView view = new ItemView(50);
    
                // Limit the property set to the property ID for the base property set, and the subject and item class for the additional properties to retrieve.
                view.PropertySet = new PropertySet(Meetingpropertydefinition, ItemSchema.Subject, ItemSchema.ItemClass);
    			
                // Setting the traversal to shallow will return all non-soft-deleted items in the specified folder.
                view.Traversal = ItemTraversal.Shallow;
    
                // Send the request to search the Inbox and get the results.
                FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.DeletedItems, searchFilter, view);
    
                // Display each item.
    		Console.WriteLine("\n" + "Item type".PadRight(50) + "\t" + "Subject");
                foreach (Item myItem in findResults.Items)
                {
    				
                    Console.WriteLine(myItem.Subject.ToString());
    							
    				Console.WriteLine(myItem.Id);
    			
    			
    				
                }

    what i want to querry was to get meetings from deleteItems that have extended properties.

    Is it possible to querry something like that?


    Friday, July 8, 2016 8:51 AM
  • You should be doing two thing first include your Extended property in the Property set you using in the FindItem request which will make it available in the results 

    eg add it into

     view.PropertySet = new PropertySet(Meetingpropertydefinition, ItemSchema.Subject, ItemSchema.ItemClass);
    ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
    view.PropertySet.Add(BlahProp)

    Or if you want to find an Item that matches a particular property value create a Searchfilter using an IsEqual Eg

     ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
     SearchFilter sf = new SearchFilter.IsEqualTo(BlahProp, "Value232");

    If you just want to list items where your particular property is set use an Exists filter eg

    ExtendedPropertyDefinition BlahProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "Blah", MapiPropertyType.String);
    SearchFilter sf = new SearchFilter.Exists(BlahProp);

    Cheers
    Glen

     

    • Marked as answer by Rahul_varma Tuesday, July 12, 2016 11:17 AM
    Monday, July 11, 2016 2:35 AM