Posts Tagged ‘Sharing record with Team’

using  System; using System.Collections.Generic; using System.Text; using Microsoft.Crm.Sdk; using Microsoft.Crm.SdkTypeProxy; using Microsoft.Crm.Sdk.Query; namespace CRM.Customization.Sharing { public class SharingRecord:IPlugin { string teamId = string.Empty; #region IPlugin Members public void Execute(IPluginExecutionContext context) { DynamicEntity entity=null ; if (context.InputParameters.Properties.Contains(“Target” ) && context.InputParameters.Properties["Target"] is DynamicEntity ) { entity = (DynamicEntity)context.InputParameters.Properties["Target" ]; Guid recordId=(Guid)context.OutputParameters.Properties["id" ]; ICrmService service = context.CreateCrmService(true ); // [...]