locked
Finding a contact item in a public folder by an extended property RRS feed

  • Question

  • I have a public folder with contact inside it. This contacts have outlook extended properties on them and I need to find a contact and update them via ews.

     foreach (DataRow row in data.Rows)
                {
                    var view = new ItemView(5)
                                   {
                                       PropertySet = new PropertySet()
                                   };
    
                    var propertySetId = new Guid("{00062004-0000-0000-C000-000000000046}");
                    var orgId = new ExtendedPropertyDefinition(
                        propertySetId,
                        0x3A10,
                        MapiPropertyType.String);
    
               
                    var sf = new SearchFilter.IsEqualTo(orgId, row["contactId"].ToString());
                    var findFolder = service.FindItems(folderId, sf, view);
    
                    foreach (Item i in findFolder)
                    {
                        
                    }
                }

    That is my current block of code, but it never find ANY contact. 

    I'm using the information from: http://msdn.microsoft.com/en-us/library/exchange/gg274394(v=exchg.80).aspx#PropertyIdValues

    Any help would be greatly appreciated.

    Thanks,
    -Stephen

    Tuesday, September 18, 2012 2:48 PM

All replies

  • It seems that 

    OrganizationalIDNumber

    14864 (0x3A10)

    0x3A10 Is the value that is not working, the code above works for everything else that I have tried on the list but that one. Does anybody have any idea what the orgIdnumber hexadecimal is?

    Thanks
    -Stephen

    Tuesday, September 18, 2012 6:41 PM
  • try 0x804f value
    Friday, September 21, 2012 1:34 PM