Community
Showing results for 
Search instead for 
Do you mean 
Reply

how to get future activities associated with a given group or contact.

Accepted Solution Solved
Copper Contributor
Posts: 11
Country: Canada
Accepted Solution

how to get future activities associated with a given group or contact.

Hi,

I am asking for help by SDK ( I'm using 2010, but guess is same for 2009/2008...),   get future activities associated with a group or contact....

i want to do is to get activities list by given a group name...  I only see in Activity class, there is getGroups() methods, but I seeking for getActivities from a group. 

 

thanks a lot...

Felix


Accepted Solutions
Solution
Accepted by topic author felixl
‎09-25-2015 03:20 AM
Nickel Super Contributor
Posts: 441
Country: UK

Re: how to get future activities associated with a given group or contact.

This will get the activities for contacts in a group:

 

'get the group
        Dim group As Act.Framework.Groups.Group = ActApp.ApplicationState.CurrentGroup '= get your group here

        'create the filter
        Dim fCriteria As New Act.Framework.Activities.ActivityDateFilterCriteria(ActApp.ActFramework.Activities.GetFieldDescriptor("STARTTIME"), Now, Now.AddYears(50))

        'create the sort criteria
        Dim sCrtieria As New Act.Framework.Activities.ActivitySortCriteria(ActApp.ActFramework.Activities.GetFieldDescriptor("STARTTIME"), System.ComponentModel.ListSortDirection.Ascending)

        'get the activities
        Dim alist As Act.Framework.Activities.ActivityList
        alist = ActApp.ActFramework.Activities.GetActivitiesForAllGroupContacts(sCrtieria, New Act.Framework.Activities.ActivityDateFilterCriteria() {fCriteria}, group, _
                                                                      Now, Now.AddYears(50), Act.Framework.Activities.FirstInstanceRestriction.FirstUnclearedOccurrence, False)

 

Tom

 

 

View solution in original post


All Replies
Solution
Accepted by topic author felixl
‎09-25-2015 03:20 AM
Nickel Super Contributor
Posts: 441
Country: UK

Re: how to get future activities associated with a given group or contact.

This will get the activities for contacts in a group:

 

'get the group
        Dim group As Act.Framework.Groups.Group = ActApp.ApplicationState.CurrentGroup '= get your group here

        'create the filter
        Dim fCriteria As New Act.Framework.Activities.ActivityDateFilterCriteria(ActApp.ActFramework.Activities.GetFieldDescriptor("STARTTIME"), Now, Now.AddYears(50))

        'create the sort criteria
        Dim sCrtieria As New Act.Framework.Activities.ActivitySortCriteria(ActApp.ActFramework.Activities.GetFieldDescriptor("STARTTIME"), System.ComponentModel.ListSortDirection.Ascending)

        'get the activities
        Dim alist As Act.Framework.Activities.ActivityList
        alist = ActApp.ActFramework.Activities.GetActivitiesForAllGroupContacts(sCrtieria, New Act.Framework.Activities.ActivityDateFilterCriteria() {fCriteria}, group, _
                                                                      Now, Now.AddYears(50), Act.Framework.Activities.FirstInstanceRestriction.FirstUnclearedOccurrence, False)

 

Tom

 

 

Copper Contributor
Posts: 11
Country: Canada

Re: how to get future activities associated with a given group or contact.

thanks,Tdavis. and I translated into C#.

 

Now I found too many fields of Activities from return . Do you know any where I can get good document / description on these fields?  there is no detail description  in SDK code reference

Copper Elite Contributor
Posts: 139
Country: United States

Re: how to get future activities associated with a given group or contact.

OK. Now for a real newbie who just wants to filter Activites by Group, I think pretty much as described here, is there a way to do this without all the code?