CRM 4.0 -PLUGININ MESAJ TİPİNE GÖRE ENTİTY GUID ID ALMA


Create”:
Guid instanceID = new Guid(context.OutputParameters.Properties["id"].ToString());

 “Update”:
Guid instanceID = (Guid)((Microsoft.Crm.Sdk.Key)((Microsoft.Crm.Sdk.DynamicEntity)context.InputParameters.Properties["Target"]).Properties[context.PrimaryEntityName + "id"]).Value;

 “SetState”:
Guid instanceID = new Guid(context.OutputParameters.Properties["id"].ToString()); 

 “Assign”:
Guid instanceID = vInstanceID = (Guid)((Microsoft.Crm.Sdk.Moniker)context.InputParameters.Properties["Target"]).Id;

Delete”:
instanceID = ((Microsoft.Crm.Sdk.Moniker)context.InputParameters.Properties["Target"]).Id;

 “Close”:
Guid instanceID = ((Microsoft.Crm.Sdk.Lookup)((Microsoft.Crm.Sdk.DynamicEntity)context.InputParameters.Properties["IncidentResolution"]).Properties[context.PrimaryEntityName + "id"]).Value;

 “Route”:
Guid instanceID = ((Microsoft.Crm.Sdk.Moniker)context.InputParameters.Properties["Target"]).Id;

 “SetStateDynamicEntity”:
Guid instanceID = ((Microsoft.Crm.Sdk.Moniker)context.InputParameters.Properties["EntityMoniker"]).Id;

Hiç yorum yok:

Yorum Gönder