Microsoft have confirmed the above is a known issue which will be resolved in the MS CRM 2015 0.3 update.
"Our escalation team considered this issue as known issue/product defect.
Basically what happens is – following query is executed to retrieve the data that will be exported to Excel:
select
top 51 "activitypointer0".ActivityTypeCode as "activitytypecode"
, "activitypointer0".Subject as "subject"
, "activitypointer0".StateCode as "statecode"
, "activitypointer0".CreatedBy as "createdby"
, "activitypointer0".RegardingObjectId as "regardingobjectid"
, "activitypointer0".ActivityId as "activityid"
, "activitypointer0".PriorityCode as "prioritycode"
, "activitypointer0".ScheduledEnd as "scheduledend"
, "activitypointer0".InstanceTypeCode as "instancetypecode"
, "activitypointer0".Community as "community"
, "activitypointer0".ModifiedOn as "modifiedon"
, "activitypointer0".CreatedByName as "createdbyname"
, "activitypointer0".CreatedByYomiName as "createdbyyominame"
, "activitypointer0".RegardingObjectIdYomiName as "regardingobjectidyominame"
, "activitypointer0".RegardingObjectTypeCode as "regardingobjecttypecode"
, "activitypointer0".RegardingObjectIdName as "regardingobjectidname"
from
ActivityPointer as "activitypointer0"
where
(((("activitypointer0".IsRegularActivity = 1 and (("activitypointer0".StateCode = 0 or "activitypointer0".StateCode = 3)))))) order by
"activitypointer0".Subject asc
, "activitypointer0".ActivityId asc
This query returns all open Activities from the CRM Organization as it doesn’t contain any additional filtering. (this is why you see more records in Excel than you see in the Associated View)
In the past ( CRM 2015 UR 0.1) following query gets generated:
select
DISTINCT top 51 "activitypointer0".ActivityTypeCode as "activitytypecode"
, "activitypointer0".Subject as "subject"
, "activitypointer0".StateCode as "statecode"
, "activitypointer0".CreatedBy as "createdby"
, "activitypointer0".RegardingObjectId as "regardingobjectid"
, "activitypointer0".ActivityId as "activityid"
, "activitypointer0".PriorityCode as "prioritycode"
, "activitypointer0".ScheduledEnd as "scheduledend"
, "activitypointer0".InstanceTypeCode as "instancetypecode"
, "activitypointer0".Community as "community"
, "activitypointer0".CreatedByName as "createdbyname"
, "activitypointer0".CreatedByYomiName as "createdbyyominame"
, "activitypointer0".RegardingObjectIdYomiName as "regardingobjectidyominame"
, "activitypointer0".RegardingObjectTypeCode as "regardingobjecttypecode"
, "activitypointer0".RegardingObjectIdName as "regardingobjectidname"
from
ActivityPointer as "activitypointer0" join ActivityParty as "activityparty1" on ("activitypointer0".ActivityId = "activityparty1".ActivityId and (("activityparty1".PartyId = 'c585d967-9029-e611-80d7-001dd8b98d3e')))
where
(((("activitypointer0".IsRegularActivity = 1 and (("activitypointer0".StateCode = 0 or "activitypointer0".StateCode = 3)))))) order by
"activitypointer0".Subject asc
, "activitypointer0".ActivityId asc
Here we do a join with the Activity Party table and return all Active Activities for which the parent record is a Party. (and this way we cover all scenarios through the ParticipationTypeMask)
A similar query is generated (the one containing the JOIN with the ActivityParty) when opening the Open Activities Associated View – this is why when simply opening that view we get the correct data. It breaks when we try to use the Export to Excel functionality.
For an Out of the box entity (ex Invoice) this returns:
"select \ntop 51 \"activitypointer0\".ActivityTypeCode as \"activitytypecode\"\r\n,
\"activitypointer0\".Subject as \"subject\"\r\n,
\"activitypointer0\".StateCode as \"statecode\"\r\n,
\"activitypointer0\".CreatedBy as \"createdby\"\r\n,
\"activitypointer0\".RegardingObjectId as \"regardingobjectid\"\r\n,
\"activitypointer0\".ActivityId as \"activityid\"\r\n,
\"activitypointer0\".PriorityCode as \"prioritycode\"\r\n,
\"activitypointer0\".ScheduledEnd as \"scheduledend\"\r\n,
\"activitypointer0\".InstanceTypeCode as \"instancetypecode\"\r\n,
\"activitypointer0\".Community as \"community\"\r\n,
\"activitypointer0\".ModifiedOn as \"modifiedon\"\r\n,
\"activitypointer0\".CreatedByName as \"createdbyname\"\r\n,
\"activitypointer0\".CreatedByYomiName as \"createdbyyominame\"\r\n,
\"activitypointer0\".RegardingObjectIdYomiName as \"regardingobjectidyominame\"\r\n,
\"activitypointer0\".RegardingObjectTypeCode as \"regardingobjecttypecode\"\r\n,
\"activitypointer0\".RegardingObjectIdName as \"regardingobjectidname\" \n
from\n ActivityPointer as \"activitypointer0\" \n
where\n ((((\"activitypointer0\".IsRegularActivity = @IsRegularActivity0 and ((\"activitypointer0\".StateCode = @StateCode0 or \"activitypointer0\".StateCode = @StateCode1))))
and ((\"activitypointer0\".RegardingObjectId = @RegardingObjectId0))))
order by\n \"activitypointer0\".Subject asc\r\n, \"activitypointer0\".ActivityId asc"
Here we filter after the RegardingObjectId – which should return all associated Activities, unless the entity is configured to be also an Activity Party – then it will return less data than expected
The fix for this issue will be published in the 2015 0.3 version."