web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Clone Quote Records in Dynamics CRM Online 2015

(0) ShareShare
ReportReport
Posted on by

I am trying to find a way for our users to be able to clone a Quote record that has custom Applied Discounts and custom Quote Product child records associated to it.

I have no scripting knowledge. Is there an OOB workaround? Maybe using a workflow? If so, how would you build the workflow?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi Jennifer,

    I worked on a team to build a free add-on that'll do exactly this. We call it CRM Snapshot and you can get it from www.cobalt.net/dynamics-crm-snapshot . You can configure a workflow that runs and clones a quote and any quote products, and even pick specific fields to exclude. It's free but it's really powerful and should be exactly what you're looking for.

    Hope this helps and I'd be happy to give any pointers with it. If this helps I'd appreciate if you'd mark this as a Verified answer.

    Thanks,

     Aiden

    EDIT: Here's a screenshot of the configuration screen, and you can see a at here http://blog.cobalt.net/thecrmlab/clone-and-update-invoices-with-dynamics-crm-snapshot

    snapshot-config.png

  • Jennifer Swanberg Profile Picture
    on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Thanks Aiden! Do I just import the solution XML excel file into CRM to install the add-on?

  • Aiden Kaskela Profile Picture
    19,696 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi Jennifer,

    Yes, just import the solution and you should be good to go :)

    Thanks,

    Aiden

  • Community Member Profile Picture
    on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hello Aiden, does your solution work for custom entities?

  • Aiden Kaskela Profile Picture
    19,696 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi Paige,

    Yes, you can copy any system or custom entity. There may be one or two hidden type system entities that just can't be copied, but otherwise you can copy anything.

    Thanks!

     Aiden

  • Mr Ramzy GHRIBI Profile Picture
    345 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi i use the snapshot solution and i have this error:


     'Exception has been thrown by the target of an invocation.'

    Any idea please ?

    thank you

  • wperkinson3 Profile Picture
    2 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    I get an error when cloning a quote that has a "Won" status.  Exception hs been thrown by the target of an invocation.

    Any thoughts on why this would happen when using Cobalt snapshot?

    Regards,

    Will

  • Emad Hanna Profile Picture
    on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    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.

  • Community Member Profile Picture
    on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi,

    I get the same Exception using Cobalt Snapshot for invoice. The problem seems to be the copy of the primary key (invoiceid). If you exclude it in the custom Snapshot it makes a clone of the invoice but without any information in it. When I try to fill out the information manually within the workflow it stops with a Waiting for Resources error. Sadly I found no way to fix it, maybe someone has an idea how to get the cloning working.

  • Inogic Profile Picture
    651 on at
    RE: Clone Quote Records in Dynamics CRM Online 2015

    Hi Jennifer,

    Kindly check the below tool which will satisfy your needs. Apart from copying data of quote to quote with line items, this tool also offers options to copy the data from one entity record to another entity along with the relationships.

     

    https://www.inogic.com/product/productivity-pack/click-2-clone-microsoft-dynamics-crm-records

     

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans