locked
copy a case from 1 environment to another? RRS feed

  • Question

  • Hello, I'd like the ability to copy a case from one environment to another. Specifically, I'd like the ability to do this from prod to dev so I can step through the code in debug mode to get a better understanding of errors.  Is there a relatively easy way to do this?  Or do you have some code that you've written/tested/proven that does this?
    Thursday, March 6, 2014 12:37 AM

All replies

  • try to build an console application  to copy data from one organization to another and

    then use task scheduler to register . and use key as updated on value to handle duplicity.

    Or you can use plugin on create,update,resolve,reactivate of case   .


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Thursday, March 6, 2014 4:00 AM
  • My main concern is trying to ensure that all related case data gets copied over.  Are there any special techniques/considerations for this?  If I write a QueryExpression to get all case data then I don't think the case data in related entities will get copied over by default - only the case fields that I specify in the QueryExpression Column.

    Thursday, March 6, 2014 5:46 PM
  • Hi dotnetteramg,

    You have two approaches for this:

    1. Batch application: This will basically be a console application in C# wherein you will need to write code to connect to your production server, fetch the Case and all its related data (like related entities, etc) manually using query expression/fetchxml and create them in the development environment. I would suggest doing that very carefully and keeping the two CRM server URLs configurable in app.config and double check it before executing (since it's the production server you're dealing with on one end). Additionally, if you want only a handful of cases to be copied over to the development environment, you can specify a filter criteria in your code itself.

    2. Use SSIS Package: In this case you don't have to write code; but you've to be extra careful because you're dealing with the databases. Configure your SSIS package to move required information from production to development. This will probably take much lesser time as you're connecting databases without having to go through the CRM web services proxy and all; but this is risky and difficult since you'd need to know each and every table here from where to copy data. Any missing table data will corrupt your data inserted into development (missing reference Guids, etc).

    If you ask me, I would prefer the first approach since it's not error prone, and you can just copy the data that you need by the filter criteria.


    Admin QuikView Solution for CRM 2013

    Thursday, March 6, 2014 6:07 PM