Hi, I tried the Cobalt solution, but I keep getting an error.
It looks like a fantastic solution, did anyone get it to work for quotes and quote products?
Exception has been thrown by the target of an invocation.
Plugin Trace:
[Cobalt.Components.Crm.Plugins.Snapshot: Cobalt.Components.Crm.Plugins.Snapshot.Snapshot3DCloneWorkflow]
[Cobalt Snapshot: Configurable Clone]
Exception caught in Workflow: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Unexpected exception from plug-in (Execute): Cobalt.Components.Snapshot.Plugins.PluginAdapter: System.NullReferenceException: Object reference not set to an instance of an object.
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.CreateInternal(Entity entity)
at Cobalt.Adapters.Platform.Crm2011.DataRequestHandler.Create(DynamicEntity entity)
at Cobalt.Components.Snapshot.Plugins.BusinessObjects.SnapshotBusinessObject.CreateSnapshot(DynamicEntity theEntity, Boolean setRegarding, String reason, Boolean persistSnapshot, Nullable`1 defaultAction, String complexInstructions)
at Cobalt.Components.Snapshot.Plugins.EntityEventHandler.Clone()
at Cobalt.Components.Snapshot.Plugins.EventHandler.Execute(String messageName, RequestStage stage, Guid businessUnitId, Guid userId)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Cobalt.Adapters.Platform.Core.EventHandlerInfo.Execute(Object[] constructorParameters, Object[] methodParameters)
at Cobalt.Components.Snapshot.Plugins.EventDispatcher.DispatchEvent(Object sender, EventSource source, String eventName, RequestStage stage, Boolean async, DynamicEntity preImageEntity, Object[] parameters)
at Cobalt.Components.Crm.Plugins.Snapshot.WorkflowAdapter.Execute(CodeActivityContext executionContext, String messageName)
Unexpected exception from plug-in (Execute): Cobalt.Components.Snapshot.Plugins.PluginAdapter: System.NullReferenceException: Object reference not set to an instance of an object.
Timestamp: 10/02/2018 23:05:33
Code: -2147220956
Message: Unexpected exception from plug-in (Execute): Cobalt.Components.Snapshot.Plugins.PluginAdapter: System.NullReferenceException: Object reference not set to an instance of an object.
Plugin Trace:
[Cobalt.Components.Crm.Plugins.Snapshot: Cobalt.Components.Snapshot.Plugins.PluginAdapter]
[18aa700e-2023-e511-9f31-00155d690d01: Cobalt.Components.Snapshot.Plugins.PluginAdapter: Create of cobalt_snapshot]
Beginning Transacion Local Identifier: d0754d33-56c3-4a32-9f3e-54488a01178d:1
Beginning Transacion Transaction Count: 0
BeginTransaction Local Identifier: d0754d33-56c3-4a32-9f3e-54488a01178d:1
Transaction Count: 1
Current Depth: 2
Dispatch Event Local Identifier: d0754d33-56c3-4a32-9f3e-54488a01178d:1
Dispatch Event Transaction Count: 1
Exception caught in Transaction: d0754d33-56c3-4a32-9f3e-54488a01178d:1 - CrmContextId: 7c5b3eac-bb33-42d3-a876-d1d3ba8eab23 - TransactionCount: 1 - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Cannot insert duplicate key.
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.CreateInternal(Entity entity)
at Cobalt.Adapters.Platform.Crm2011.DataRequestHandler.Create(DynamicEntity entity)
at Cobalt.Components.Snapshot.Plugins.BusinessObjects.SnapshotBusinessObject.Clone()
at Cobalt.Components.Snapshot.Plugins.SnapshotEventHandler.RunPostCallout(SnapshotBusinessObject snapshot)
at Cobalt.Components.Snapshot.Plugins.SnapshotEventHandler.PostCreate()
at Cobalt.Components.Snapshot.Plugins.EventHandler.Execute(String messageName, RequestStage stage, Guid businessUnitId, Guid userId)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Cobalt.Adapters.Platform.Core.EventHandlerInfo.Execute(Object[] constructorParameters, Object[] methodParameters)
at Cobalt.Components.Snapshot.Plugins.EventDispatcher.DispatchEvent(Object sender, EventSource source, String eventName, RequestStage stage, Boolean async, DynamicEntity preImageEntity, DynamicEntity postImageEntity, Object[] parameters)
at Cobalt.Adapters.Platform.Crm2011.PluginAdapter.Execute(IServiceProvider serviceProvider)
Inner Fault: Has Inner Fault
5f19437f-929b-49a8-91cd-36674feeec6a:2
Error Message:
Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Exception has been thrown by the target of an invocation.