Community
Showing results for 
Search instead for 
Do you mean 
Reply

History: Obtaining the associated Group

Accepted Solution Solved
Copper Super Contributor
Posts: 482
Country: Australia
Accepted Solution

History: Obtaining the associated Group

Hello all

 

Wondering if any one can help me

 

I have existing code that obtains a Contact's History in a list between two dates and calculates the total Duration spent and number of Type and then updates the Contact record

 

I am now looking to expand this to included counting the Group the History item is associated with but i am having trouble getting the Group name, i thought i had it with "h..HistoryType.HistoryTypeGroupName == GrpType1" but that does not work

 

Any ideas on how to obtain the Group name the History is associated with??????

 

Thanks


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6

Accepted Solutions
Solution
Accepted by topic author JasonD
3 weeks ago
Copper Elite Contributor
Posts: 89
Country: Canada

Re: History: Obtaining the associated Group

I believe there is a SetGroups method you can use for that.

 

activity.SetGroups(groupList);
Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca

View solution in original post


All Replies
Copper Elite Contributor
Posts: 89
Country: Canada

Re: History: Obtaining the associated Group

The "GroupList" property of the history record should indicate the groups the history is linked to. You can iterate through the groups in the grouplist and just call the group.ToString() method to get the group name

Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca

Copper Super Contributor
Posts: 482
Country: Australia

Re: History: Obtaining the associated Group

Thanks for that

 

I muddled through it using the History AssociationSummary, unfortunetly i think that just shows one option only

 

                        if ((actualEnd.Date >= startT.Date) && (actualEnd.Date <= endT.Date) && (h.AssociationSummary == GrpTypeA1)) { GrpCountA1++; }

 


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 482
Country: Australia

Re: History: Obtaining the associated Group

Would you know how to set the Group on a new activity? I got the code all done for the activity but cant workout how to set a Group

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Solution
Accepted by topic author JasonD
3 weeks ago
Copper Elite Contributor
Posts: 89
Country: Canada

Re: History: Obtaining the associated Group

I believe there is a SetGroups method you can use for that.

 

activity.SetGroups(groupList);
Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca