locked
Plugin needs external data RRS feed

  • 问题

  • Hi,

    Is it possible to create a plugin that connects with another SQL DB to get/ send data?

    Thanks.

    2015年6月9日 7:16

全部回复

  • a plugin can call external webservices, so you need to create a webservice that will make available the SQL DB data

    My blog: www.crmanswers.net - CRM Theme Generator

    2015年6月9日 7:44
  • So is it only possible with webservices?

    The SQL database we want to connect to, doesn't have any webservices at this moment (it is a custom database).

    Is it also possible to read / write direct on the custom SQL database within this plug in?

    2015年6月9日 8:07
  • you can connection db using ado.net, i think. But, you have to consider how to maintain the connection string and credentials.

    daemon lin

    2015年6月9日 8:35
  • If the plugin assembly is not registered in the sandbox, then you can directly access a SQL DB. As plugins in Crm Online have to be registered in the sandbox, then this is not possible in Crm Online.

    Managing credentials is fairly straightforward. You've 2 options:

    • Use Windows authentication, in which case the connection is made under the identity that runs the plugin. If the plugin is running synchronously, this is the identity of the CrmAppPool, and if it's asynchronous, it's the account the Crm Async Service runs under
    • Use Sql Authentication. You can store the username and password in the Secure configuration string of the plugin registration step

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    2015年6月9日 8:55
    版主