Коллеги, подскажите пожайлуйста, в чем может быть проблема?
Есть звонок, его сохраняют с такими же параметрами, например меняем коммент, и выдается ошибка
X++:
The Web Service plug-in failed in OrganizationId: ba06c0f8-0eb6-4a90-ae2c-ed6f49d1ca1c; SdkMessageProcessingStepId: 9ecdbb1b-ea3e-db11-86a7-000a3a5473e8; EntityName: phonecall; Stage: 30; MessageName: Update; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: .
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.NullReferenceException: .
Microsoft.Crm.ObjectModel.GenericActivityServiceBase.SetScheduledDurationMinute(BusinessEntity entity, Object scheduledStart, Object scheduledEnd, ExecutionContext context, Boolean isCreate)
Microsoft.Crm.ObjectModel.GenericActivityServiceBase.ThrowIfInvalidForUpdate(BusinessEntity entity, ExecutionContext context)
Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.Update(IBusinessEntity entityInterface, ExecutionContext context)
но как только я меняю поле "срок" на любое другое значение, например на 1 минуту вперед-назад, то ошибка пропадает. После чего я возвращаю обратно это время, ничего не появляется....
Судя из ошибки это не мои плагины.
Ну в одном из плагинов я делаю так
X++:
SetEntityValue(ref target, DateTime.Now.AddMinutes(30), "actualstart");
SetEntityValue(ref target, DateTime.Now, "scheduledend");
и вот в этих звонках такая проблема.
Заранее благодарен!