Impersonate in Plugins:
ICrmService service = context.CreateCrmService(context.InitiatingUserId);
Instead of context.InitiatingUserId use the user guid of the user.
ICrmService service = context.CreateCrmService(userId);
To Impersonate in WebPages:
Create crmservice and assign callerid property to the user to be impersonated.
No comments:
Post a Comment