Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Employee
mwood
Posts: 1,163
Country: USA
Message 11 of 13 (825 Views)

Re: Retrieving Contacts by Modification Date

[ Edited ]

Well I made an attempt at translating this but had the same results you're having. I thought I was just translating what I had in c into VB, but there's obviously some syntax issue that i'm not aware of.

 

Here's what I have that isn't working in case it's helpful in some way

 

Dim ContactField As ContactFieldDescriptor =
            _afw.Contacts.GetContactFieldDescriptor("TBL_CONTACT.EDITDATE", MutableEntities.FieldNameType.Real)
Dim FilterArray(1) As IFilterCriteria
Dim startDate As System.DateTime = System.DateTime.Parse("1/1/1900")
Dim endDate As System.DateTime = System.DateTime.Parse("1/1/2050")
FilterArray(0) = New Act.Framework.DateFilterCriteria(ContactField, startDate, endDate)
Dim List As ContactList = _afw.Contacts.GetContacts(Nothing, FilterArray)

Matthew Wood
Act! SDK Support
Community Moderator
Please use plain text.
Astute Commentator
Thatch2
Posts: 146
Country: United States
Message 12 of 13 (813 Views)

Re: Retrieving Contacts by Modification Date

So when I inspect the filter, the value I get is listed below:

 

?FilterArray(0).GetClause
"TBL_CONTACT.EDITDATE >= '1900-01-01T05:00:00' AND TBL_CONTACT.EDITDATE < '2050-01-02T04:59:59'"

 

I'm not sure if the date on this query really reflects a correct SQL date. I have never seen an SQL date to be '1900-01-01T05:00:00' . Maybe it is a new numenclature. Could this be the problem?

 

 I tried all kinds of different avenues on this, with no luck. I'd think you have the same problem with C# . I know C# pretty well and the code in VB.net is the same as the one in C# that is posted.

 

Any help on getting this working is much welcome. Anybody at Sage that can help us on this?

 

 

Please use plain text.
Employee
mwood
Posts: 1,163
Country: USA
Message 13 of 13 (807 Views)

Re: Retrieving Contacts by Modification Date

I was very surprised that the c# code worked and the vb didn't, like you said, they appear to be identical. Seems I remember there being some difference in filter in c# and vb but I can't seem to find the article again.

 

I could try bouncing this off a few folks here, but I honestly can't think of any that use VB. =\

 

Might be worthwhile to bounce this off the folks at MSDN as it may have something to do with .NET since our code appears to me to be identical.

Matthew Wood
Act! SDK Support
Community Moderator
Please use plain text.