I need to make sure the state of all activities related to a case (incident) entity in CRM 2011 are set to completed before I can set the state of the case itself to resolved.
I can do several retrieves to get all the possible activity types independently and then do an appropriate SetStateRequest(...) on each type. This article seems to suggest that an ActivityPointer record is created every time any activity type record is created and that both records have the same ID. Sure enough, when I look at cases and activities, every activity type record has an associated ActivityPointer record with the same ID. So far so good.
Does this mean that I can do a single retrieve of all ActivityPointer records that relate to my case and set the state on them to achieve a cross-type activity state setting? I suppose I'm not understanding what the purpose of ActivityPointer is if it doesn't allow me to do generic activity manipulations. Is that the point if it? Also, the ActivityPointer entity doesn't have a SetStateRequest message so can someone explain how I go about setting statecode/status on an ActivityPointer record? Ideally I want a state of completed and a status of cancelled.
Update: This blog seems to show exactly what I want although the offical docs on SetStateRequest seem to indicate that it doesn't support the ActivityPointer entity. I'll try this tomorrow but if anyone has advice on the best way to proceed I'd be obliged.
Update2: On further reading, I think the situation is that an ActivityPointer entity can only have it's state set. So I should be able to set all the activitypointer records to a state of cancelled per this setup. I suppose it makes sense that I cannot generically set the "Status Reason" as it differs between activity types. I'm still a bit confused about the previous link in that it seems to suggest that I can set the State and the Status of an activitypointer but it's not clear if this is true, what values combos are allowed and what they mean...