Redemption using filter on a custom datetime field in contacts.
Posted
by Spitje
on Stack Overflow
See other posts from Stack Overflow
or by Spitje
Published on 2010-04-28T14:25:19Z
Indexed on
2010/06/12
0:02 UTC
Read the original article
Hit count: 209
Hello,
I'm having a problem using a filter on a custom date in contacts.
RDOItems Contacts = null;
string strSearch = string.Empty;
strSearch = AddQuotes("http://schemas.microsoft.com/mapi/string/{01234567-8901-2345-C678-901234567801}/CustomFieldString");
strSearch += " <> '' ";
strSearch += " AND ";
strSearch += AddQuotes("http://schemas.microsoft.com/mapi/string/{01234567-8901-2345-C678-901234567802}/CustomFieldDate");
strSearch += " < ";
strSearch += "'2010-04-28 18:00'";
Contacts = (RDOItems)synContacts.Items.Restrict(strSearch)
When i use only the first part of the filter (CustomFieldString) i get the right contacts, but when i expand the filter with the datetime field no contacts are returned.
Thanks,
Spitje
© Stack Overflow or respective owner