I'm trying to modify the SDK example;
CRMActivity.RetrieveByPrincipal Method to lookup
activities by team not by user.
securityPrincipal.Id = userAuth.UserId;
is being changed to = a valid TeamId
and
securityPrincipal.Type =
Microsoft.CRM.Proxy.SecurityPrincipalType.sptUser;
is changed from .sptUser to .sptTeam;
The following function crashes with a 80070057
error, "the parameter is incorrect".
string strActivityXml = activity.RetrieveByPrincipal
(userAuth, securityPrincipal, "", "", activityTypes,
activityStates, strColumnSetXml);
If I revert back to .sptUser and use a valid userid then
the function works fine. I notice .sptMerchant is
available also but read somewhere that the flag isn't
supported yet.
Can anyone help with this?
Thanks.