08-27-2012 10:24 AM
How would I retrive history for a specific contact within a specfic date.
I tried using .DateFilterCriteria.CalculateDateRange and I can not get it to work. Has anybody used this before. Or can someone point me in the right direction.
08-27-2012 11:23 AM
You're on the right track, you'll probably need to use both a DateFilterCriteria to narrow by date and a ComparisonFilterCriteria to filter by contacts unless you do so when retrieving the histories. Using the DateFilterCriteria would look something like this:
DateTime StartTime = System.DateTime.Parse("8/18/2000 1:15:00 PM");
DateTime EndTime = System.DateTime.Now.AddYears(10);
DBFieldDescriptor EditDate = _ActApp.ActFramework.Contacts.GetFieldDescriptor("TBL_CONTACT.EDITDATE", true);
IFilterCriteria DateFilter = new IFilterCriteria;
DateFilter = new DateFilterCriteria(EditDate, StartTime, EndTime);
One of the overloads for the GetHistories methods accepts both a filter criteria and a contact as a parameter. Hope this helps.