Community
Showing results for 
Search instead for 
Do you mean 
Reply

Determining an Activity from a New History

Accepted Solution Solved
Nickel Super Contributor
Posts: 352
Country: Canada
Accepted Solution

Determining an Activity from a New History

Hi All,

 

When the CreateHistoryComplete event fires, you get the History record, but must be a way to get the originating Activity, right?

 

I can't seem to figure it out.  If I grab the ActivityClearedID on the History, it gives me a Guid but it's not the one that matches up with the original Activity, it's a different Guid.

 

I am sure I am missing something but don't know what.

 

Thanks,

Len

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training

Accepted Solutions
Solution
Accepted by topic author lkamerman
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Determining an Activity from a New History

This is just off the top since I caught this on my way out this office, but I believe the activity cleared event passes in an IActivity object that is the activity that's been cleared.

 

Hope that helps, if not I'll check into it more tomorrow and see what I can come up with.

Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Solution
Accepted by topic author lkamerman
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Determining an Activity from a New History

This is just off the top since I caught this on my way out this office, but I believe the activity cleared event passes in an IActivity object that is the activity that's been cleared.

 

Hope that helps, if not I'll check into it more tomorrow and see what I can come up with.

Matthew Wood
Act! SDK Support
Community Moderator
Nickel Super Contributor
Posts: 352
Country: Canada

Re: Determining an Activity from a New History

Thanks Mike, I think that'll do it.

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training
Nickel Super Contributor
Posts: 352
Country: Canada

Re: Determining an Activity from a New History

OK - so I've run into an issue now, I need to be able to grab the cleared activity as well as the history.  I need the date the activity was actually cleared for, not just the originally scheduled date, which is only available from the history.  I need the location though, so I also need the activity.

 

I would like to avoid watching both events and checking for matches...

 

Any input greatly appreciated!

 

Thanks,

Len

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training
Employee
Posts: 1,163
Country: USA

Re: Determining an Activity from a New History

The OccurEndTime property for a cleared activity should return the actual cleared date.

Matthew Wood
Act! SDK Support
Community Moderator
Nickel Super Contributor
Posts: 352
Country: Canada

Re: Determining an Activity from a New History

Ended up watching for an activity to clear and then storing that, then catching history completion, and if the history's ActivityID isn't empty, it's a safe assumption that the IActivity matches the history passed.  Works well.

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training