03-25-2008 01:26 PM
03-25-2008 02:27 PM
03-25-2008 02:37 PM
03-26-2008 07:49 AM - edited 03-26-2008 07:51 AM
T,
This should be an example of how this should work.
Let me know if you run into any problems as I am investigating a possible issue with this
try
{
ContactFieldDescriptor cfd1 = ActFwk.Contacts.GetContactFieldDescriptor("TBL_CONTACT.EDITDATE", true);
SortCriteria[] sCriteria ={ new SortCriteria(cfd1, ListSortDirection.Descending) };
ContactList cList;
System.DateTime d1;
System.DateTime d2;
d1 = System.DateTime.Parse("01/01/1980");
d2 = System.DateTime.Parse("12/31/2007");
IFilterCriteria[] oFilterCriteria = { new DateFilterCriteria(cfd1, d1, d2) };
cList = ActFwk.Contacts.GetContacts(sCriteria, oFilterCriteria);
///Continue your code ....
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
03-26-2008 09:30 AM
03-26-2008 09:57 AM
03-26-2008 10:58 AM - edited 03-26-2008 10:59 AM
03-26-2008 05:59 PM
08-02-2010 07:53 PM
I tried numerous instances of this code to no avail. The best I could come up with is:
Dim cfd1 As ContactFieldDescriptor = ACTFM.Contacts.GetContactFieldDescriptor("TBL_CONT
Dim MyACTGuid As System.Guid
Dim ACT_Filter_Criteria(1) As Act.Framework.IFilterCriteria
Dim dStartFilter As Date
Dim dEndFilter As Date
dStartFilter = System.DateTime.Parse("1/1/1900")
dEndFilter = System.DateTime.Parse("1/1/2050")
ACT_Filter_Criteria(0) = New Act.Framework.DateFilterCriteria(cfd1, dStartFilter, dEndFilter)
MyACTList = ACTFM.Contacts.GetContacts(Nothing, ACT_Filter_Criteria)
The code below should return all data that has been modified since 1900 (which is everything in the database. However, it returns 0. Can SOMEONE tell me what is wrong with this code and/or how to make an iFilterCriteria work in VB.Net?
Thanx in advance.
Tom
08-03-2010 07:54 AM
Here is another working version in c# -- I figured I'd post this for now, and I should be able to get a translation up here soon but it might take a bit as I don't really use vb
ContactFieldDescriptor ContactField = afw.Contacts.GetContactFieldDescriptor("TBL_CONTAC
IFilterCriteria[] CriteriaRay = new IFilterCriteria[1];
DateTime StartDate = System.DateTime.Parse("1/1/1900");
DateTime endDate = System.DateTime.Parse("1/1/2050");
CriteriaRay[0] = new Act.Framework.DateFilterCriteria(ContactField, StartDate, endDate);
ContactList cl = afw.Contacts.GetContacts(null, CriteriaRay);
