Hi,
Today we got a requirement what are the permissions of the user on a particular record. To fullfill this requirement, there is a SDK message called "RetrievePrincipalAccessRequest"
Here is the sample code of it.
RetrievePrincipalAccessRequest retrieveRequest = newRetrievePrincipalAccessRequest();
// record for which we want to check the accessretrieveRequest.Target = newEntityReference("opportunity", newGuid("A9F18D5F-6A08-E611-80DE-000D3AA03DA0"));
// User or Team entity Reference
retrieveRequest.Principal = newEntityReference("systemuser", newGuid("1C5A2AE8-AD00-E611-80DD-000D3AA03DA0"));
RetrievePrincipalAccessResponse retrieveResponse = (RetrievePrincipalAccessResponse)crmSerivce.Execute(retrieveRequest);
In the response we get the combination of all the rights either through sharing or his own security roles
Hope this helps.
--
Happy CRM'ing
Gopinath