简体   繁体   English

在线将附件上载到Dynamics CRM 2015中的SharePoint

[英]Upload attachments to SharePoint in Dynamics CRM 2015 online

I have a use case where I am building an internet facing asp.net web form for a user to submit a new record to CRM. 我有一个用例,其中我正在构建一个面向asp.net的互联网表单,供用户向CRM提交新记录。 This web form links to a CRM online instance, which is integrated to a SharePoint online instance. 该Web表单链接到CRM在线实例,该实例已集成到SharePoint在线实例。 The user that logs into CRM, has access to SP as well. 登录到CRM的用户也可以访问SP。

As part of this new record, I also want to give them the ability to add an attachment, and have that attachment go directly into the SharePoint document library/server that is linked to the CRM instance. 作为此新记录的一部分,我还希望使他们能够添加附件,并使该附件直接进入链接到CRM实例的SharePoint文档库/服务器。

I can see some SharePoint entities listed in the SDK like SharePointData, SharePointDocument, DocumentLocation, and Site, but cannot find any sample code on how to use them, or how to get a file into SP via the SDK? 我可以看到SDK中列出了一些SharePoint实体,例如SharePointData,SharePointDocument,DocumentLocation和Site,但是找不到有关如何使用它们或如何通过SDK将文件导入SP的任何示例代码?

Any xRM examples out there that I could use? 我可以使用任何xRM示例吗?

If you're working with you're own internet facing asp.net web form, you can also upload the file to SharePoint directly. 如果您使用的是面对Internet的asp.net Web表单,则还可以直接将文件上传到SharePoint。 You just need to have the location to store the file. 您只需要具有存储文件的位置。 And I assume you can get that from CRM. 我想您可以从CRM中获得这一点。

You have two options: 您有两种选择:

  1. Using the SharePoint rest endpoint 使用SharePoint其余终结点
  2. Or use the SharePoint.Client assembly. 或使用SharePoint.Client程序集。

This is the MSDN article for SharePoint online: https://msdn.microsoft.com/en-us/library/office/dn904536.aspx 这是SharePoint Online的MSDN文章: https : //msdn.microsoft.com/zh-cn/library/office/dn904536.aspx

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

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