Возникла вот какая ошибка: Данный пример был приведен для связей N:N у меня же связь 1:N. Код то на онлоад формы я подкорректировал, стала грузиться aspx страница, для выборки записей, но при нажатии на кнопку "ОК" у меня вылетает с ошибкой. И вот, что пишет в файле трассировки:
Код:
>MessageProcessor fail to process message 'AssociateEntities' for 'none'.
[2010-07-09 07:54:51.4] Process: w3wp |Organization:e26d7e2d-33b0-417e-8875-7e0c045fda3e |Thread: 1 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception has been thrown by the target of an invocation.
Error Number: 0x8004024A
Error Message: Entity Relationship new_group_scan is not a many-to-many entity relationship
Error Details: Entity Relationship new_group_scan is not a many-to-many entity relationship
Source File: Not available
Line Number: Not available
Request URL: http://vms2:5555/Keysystems/AppWebServices/AssociateRecords.asmx
Stack Trace Info: [CrmException: Entity Relationship new_group_scan is not a many-to-many entity relationship]
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.GetAssociationEntityRelationship(String associationRelationshipName, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.HandleAssociationOperation(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, Boolean createAssociation, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.AssociateEntities(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, ExecutionContext context)
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.AssociateEntitiesCommand.Execute()
at Microsoft.Crm.Application.WebServices.AssociateRecords.Associate(Int32 objectType, Int32 parentObjectType, Guid objectId, Guid parentId, String subType, String associationName)
Понятно, что моя связь не является связью многие-ко-многим, но как это исправить? Ни в коде онлоада формы, ни на аспх странице не нашел причины этого ругательства. Очень прошу подсказать, как это исправить?