Failing at Deleting MetaData item. RRS feed

  • Question

  • I'm building a knowledge sync provider and am having trouble successfully deleting an item out of the metadata.  Specifically, I can find the item with FindItemMetadataByUniqueIndexField, then, I mark it as deleted in the code below, then save it.

    Any suggestions?  I know if I jump the code that created the metadata item, all works correctly so I'm pretty sure it's a delete problem.

    // first, since updatemetadata already added metadata for this item in local, we need to remove it first
              var itemToDelete = _replicaMetadata.FindItemMetadataByUniqueIndexedField(FileNameUriCF, uri);
              SyncVersion newVersion = new SyncVersion(0, _replicaMetadata.GetNextTickCount());
              SaveItemMetadata(itemToDelete, 0); // set timestamp to 0 for tombstones
     private void SaveItemMetadata(ItemMetadata item)

    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
    Sunday, November 28, 2010 3:36 AM