I have setup N:N relationship between Account and System User and making an association in the plugin during Update and Create of account. Plugin works as expected when I create an account / update the account manually. but plugin throws exception during the SSIS job execution.
Below is the stack trace I am getting on execution of Service.Associate method in Plugin. The issue is that there is no error in the stack trace and not able to find out the root cause.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest, Object sandboxTraceSettingsObj)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest, Object traceSettings)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.AssociateInternal(String entityName, Guid entityId, Relationship relationship, EntityReferenceCollection relatedEntities)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.Associate(String entityName, Guid entityId, Relationship relationship, EntityReferenceCollection relatedEntities)
at Empired.Gerard.Crm.Plugins.Orion_AccountOwner_onCreate.Execute(IServiceProvider serviceProvider)
*This post is locked for comments