locked
CRM 2011: Data synchronization between different organizations RRS feed

  • Question

  • Dears,

    I have been assigned a task so that I need to synchronize opportunities and cases data between different organizations, so could anybody please advise on the best approaches or practices to do this ??

    I was thinking to do something to synchronize the organizations DBs but I know it's not recommended to deal directly with the CRM DB, so I was looking for help to do it in application through a plugin or something like this

    Any help will be appreciated

    Thanks and best regards..


    • Edited by Mostafa Moatassem Thursday, October 27, 2011 12:51 PM updating thread title from different entities to different organizations
    Thursday, October 27, 2011 12:35 PM

Answers

  • Hi Mostafa:

    In order to update a different org, you will need to create a new connection to that org and use that all from within your plugin.  Ideally, your current user will have permissions in both orgs.  If not, you will have to establish a proxy user that does and use that in your connection.  See the CRM 2011 SDK if you need any help.  It includes good examples of creating a connection, creating a service and using the service to update CRM Entities.  Since updating a record from one CRM Org to another will cause the other Org's plugin to fire, you'll have to be careful you don't get into an endless loop.

    We have used Scribe and CRM Connector in applications meant to maintain data between CRM and ERP systems.  We have not used it to maintain data between two CRM systems.  It is somewhat complicated to set up and maintain.  Unless your goal is much more complex than what you describe here, I would not recommend using it in this case.

    Thursday, October 27, 2011 2:17 PM
  • Another option would be to create an external windows service that would poll for changes in one organization and creating matching records in another system. While plugins would provide real time instant update to be available to another organization, windows service would be a batch update solution.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Thursday, October 27, 2011 3:37 PM

All replies

  • I think you could argue that DB synchronization is a "Maintenance Function" and not subject to recommendations regarding direct interaction with the databases through ADO, stored procs, etc.  That having been said, it could be difficult to design for just a few tables given the possibility of various dependencies (CRM obviously is not designed for referrential integrity accross org databases).

    I think your next best bet would be to create a plugin that would run on Create, Update, Delete of records from one org to perform the same operation on the other.  Using late-bound classes you could probably write it generically to iterate the attributes and perform the update on the other org service.  If you run accross referential integrity exceptions you could trap and throw them to disallow invalid operations accross orgs.  Pass the connection info for the other org to the plugin through the config string.  You could then register the same plugin to perform synchronization on any entity/step you wish.

    Thursday, October 27, 2011 1:27 PM
  • JBlaeske,

    Thanks alot for your cooperation would you please explain how could I make a plugin that is registered in an organization to perform CRUD operations on another organization ??

    Also have read about an external tool called that is called Scribe in another thread, kindly if you have any info about it please provide it here

     

    Thanks and best regards..

    Thursday, October 27, 2011 1:50 PM
  • Hi Mostafa:

    In order to update a different org, you will need to create a new connection to that org and use that all from within your plugin.  Ideally, your current user will have permissions in both orgs.  If not, you will have to establish a proxy user that does and use that in your connection.  See the CRM 2011 SDK if you need any help.  It includes good examples of creating a connection, creating a service and using the service to update CRM Entities.  Since updating a record from one CRM Org to another will cause the other Org's plugin to fire, you'll have to be careful you don't get into an endless loop.

    We have used Scribe and CRM Connector in applications meant to maintain data between CRM and ERP systems.  We have not used it to maintain data between two CRM systems.  It is somewhat complicated to set up and maintain.  Unless your goal is much more complex than what you describe here, I would not recommend using it in this case.

    Thursday, October 27, 2011 2:17 PM
  • Another option would be to create an external windows service that would poll for changes in one organization and creating matching records in another system. While plugins would provide real time instant update to be available to another organization, windows service would be a batch update solution.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Thursday, October 27, 2011 3:37 PM