简体   繁体   English

Dynamics 365 CRM SDK或Rest API

[英]Dynamics 365 CRM SDK or Rest API

I need to create a CRM E-Mail activity with attachement from code. 我需要创建带有代码附件的CRM电子邮件活动。 As far as I know there are two ways to do this. 据我所知,有两种方法可以做到这一点。 I could use the dynamics 365 CRM SDK or the dynamics 365 CRM Rest API. 我可以使用动态365 CRM SDK或动态365 CRM Rest API。 My question is which one I should use at the moment? 我的问题是我现在应该使用哪个? I know Microsoft has many good API, but many of them seemed unfinished to me. 我知道微软有许多好的API,但是其中许多对我而言似乎还没有完成。 Can you guys help me out? 你们能帮我吗?

If you are doing integration from outside CRM, I would recommend WEB API which is the cross-platform RESTful solution going forward. 如果您要从外部CRM进行集成,我建议您使用WEB API,它是跨平台的RESTful解决方案。 Before 8.x CRM version - SDK was the only option available (still you can use it today). 在8.x CRM版本之前-SDK是唯一可用的选项(仍然可以立即使用)。

The keywords are important, you can find lot of community blogs for code samples & better documentation. 关键字很重要,您可以找到许多社区博客来获得代码示例和更好的文档。 You can setup Postman & test the web api endpoints, even you can use CRM REST Builder for development purpose. 您甚至可以使用CRM REST Builder进行开发,也可以设置Postman和测试Web api端点。

Endpoint : <your instance url>/api/data/v9.1/emails 端点<your instance url>/api/data/v9.1/emails

Create Email with attachment using SDK 使用SDK创建带有附件的电子邮件

Create Email using web api 使用Web API创建电子邮件

Adding attachments using web api 使用Web API添加附件

I've you're in the .Net Framework, always use the SDK. 我已经在.Net Framework中,请始终使用SDK。 It hasn't really changed since 2011, and they are slowly porting the calls over from the SOAP endpoint to the WebApi for you, with no work on your end. 自2011年以来,它并没有真正改变,并且他们正在为您缓慢地将呼叫从SOAP端点移植到WebApi,而无需进行任何工作。

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

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