Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

how to unshare the shared record using plugin dynamics crm 2013

$
0
0

i did share a record to another user using plugin.but the same record unsharing using plugin. but its not getting me.below is my code.the record is still exists in that user.

 if (context.InputParameters.Contains("Target") && (context.InputParameters["Target"]) is Entity)
            {
                Entity en = (Entity)context.InputParameters["Target"];
                RevokeAccessRequest revokeaccess = new RevokeAccessRequest();
                revokeaccess.Target = new EntityReference(en.LogicalName,en.Id);
                Guid id = new Guid("C059255F-5930-4DD2-A2B9-61273359C123");
                revokeaccess.Revokee = new EntityReference("systemuser",id);
                RevokeAccessResponse revokeresponse = (RevokeAccessResponse)service.Execute(revokeaccess);
            }

where i'm doing wrong.


hsk srinivas


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>