简体   繁体   English

将Microsoft Dynamics 2011与PHP集成

[英]Integrating Microsoft Dynamics 2011 with PHP

I have to do some exploratory work for a potential new project. 我必须为一个潜在的新项目做一些探索性工作。 The project is a website which will pull data (and maybe push data, not sure yet) to a Microsoft Dynamics 2011 install. 该项目是一个网站,它将数据(可能尚未推送数据)拉到Microsoft Dynamics 2011安装中。

I know there is some kind of REST API for dynamics 2011, but from googling I can't get a clear idea of what's possible in terms of Dynamics 2011 / PHP integration. 我知道有一些针对Dynamics 2011的REST API,但是通过谷歌搜索我无法清楚地了解Dynamics 2011 / PHP集成的可能性。

Will I be able to retrive all data from Dynamics using PHP? 我可以使用PHP从Dynamics中检索所有数据吗?

Will I be able to push data to Dynamics using php? 我可以使用php将数据推送到Dynamics吗?

My suggestion in this situation is always to create a C# Web Service that will act as a bridge between CRM and your php code. 在这种情况下,我的建议是始终创建一个C#Web服务,该服务将充当CRM和PHP代码之间的桥梁。

The Web Service use .NET so can easily pull the data from CRM (and push as well), and because is a Web Service you can consume it by any platform (with SOAP or REST is your decision) Web Service使用.NET因此可以轻松地从CRM中提取数据(也进行推送),并且由于是Web Service,您可以在任何平台上使用它(使用SOAP还是REST是您的决定)

About the API provided by CRM 2011, the REST endpoint is available only inside the CRM context (this means only inside javascript libraries or Silverlight web resources) 关于CRM 2011提供的API, REST端点仅在CRM上下文中可用(这意味着仅在javascript库或Silverlight网络资源中)

About SQL Server , it's supported to read the data from DB (using the Filtered Views) but not supported to insert, update or delete records using SQL commands 关于SQL Server ,支持从数据库读取数据(使用筛选视图),但不支持使用SQL命令插入,更新或删除记录

Dynamics CRM allows you to connect in various ways and which way depends on your requirements. Dynamics CRM允许您以各种方式进行连接,哪种方式取决于您的要求。

If you are using CRM Online and connecting to a PHP based website then a C# Web Service as a bridge can be a pain because you have to host it somewhere. 如果您使用CRM Online并连接到基于PHP的网站,则C#Web服务作为桥梁可能会很痛苦,因为您必须将其托管在某个地方。 In this case I have found that its best to use SOAP for connections. 在这种情况下,我发现最好使用SOAP进行连接。 The downside of a SOAP connection is there is significant more lines required because you need to put the entire SOAP request in your PHP code. SOAP连接的缺点是需要大量行,因为您需要将整个SOAP请求放入PHP代码中。 You can however retrieve and push data to CRM using PHP. 但是,您可以使用PHP检索数据并将其推送到CRM。

If you are using CRM On premise then I would suggest you look at what Guido suggested which is go with filtered views (again as Guido suggested this is read only) and then use the CRM Web Services to do your "pushing" of data to CRM. 如果您在内部使用CRM,那么我建议您查看Guido建议使用的过滤视图(同样,Guido建议这是只读的),然后使用CRM Web Services将数据“推送”到CRM 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM