简体   繁体   English

在 MS Dynamics 365 表单上显示 SharePoint 文档子网格

[英]Display SharePoint Documents Sub Grid on the MS Dynamics 365 form

I have a requirement to display SharePoint Documents Sub Grid on the MS crm Dynamics 365 Custom Entity Form.我需要在 MS crm Dynamics 365 自定义实体表单上显示 SharePoint 文档子网格。

Can anyone let me know, how to achieve this using Supported or unsupported way?任何人都可以让我知道,如何使用受支持或不受支持的方式实现这一目标?

You can find solution here :您可以在这里找到解决方案:

You may use the below line of code to set the Iframe url to display the subgrid in iframe:您可以使用以下代码行设置 iframe url 以在 iframe 中显示子网格:

Xrm.Page.getControl("IFRAME_Documents").setSrc(Xrm.Page.context.getClientUrl() + "/userdefined/areas.aspx?formid=" + CurrentFormId + "&inlineEdit=1&navItemName=Documents&oId=%7b" + recordId + "%7d&oType=" + oTypeCode + "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White");

Where:哪里:

“IFRAME_Documents” is the Iframe name. “IFRAME_Documents”是 Iframe 名称。

“CurrentFormId”= Is the Current selected form id which you can get using Xrm.Page.ui.formSelector.getCurrentItem().getId().replace("{", "").replace("}", ""); “CurrentFormId”= 是当前选择的表单 id,您可以使用Xrm.Page.ui.formSelector.getCurrentItem().getId().replace("{", "").replace("}", "");

“recordId” = Record's GUID “recordId” = 记录的 GUID

“oTypeCode” = Entity Type Code which you can get using Xrm.Page.context.getQueryStringParameters().etc; “oTypeCode” = 您可以使用Xrm.Page.context.getQueryStringParameters().etc;获得的实体类型代码Xrm.Page.context.getQueryStringParameters().etc;

This is how I did in D365.这就是我在 D365 中所做的。 (Using Chrome made it easier) (使用 Chrome 更容易)

  1. Enable document management for the entity为实体启用文档管理

  2. When Documents tab shows for the entity record open it.当实体记录的文档选项卡显示时打开它。

  3. Then open Chrome dev console (F12)然后打开 Chrome 开发控制台 (F12)

    Grab the panel (which is actually an iframe) source.获取面板(实际上是一个 iframe)源。 The URL is of format: URL 格式为:

     /userdefined/areas.aspx?appid=...........&formid=.......&inlineEdit=1&navItemName=Documents&oId=.....&oType=.....&pagemode=iframe&rof=true&security=......&tabSet=areaSPDocuments&theme=Outlook15White
  4. Replace the dotted values in the source URL with appropriate values and make the URL fully qualified prefixing with the root.用适当的值替换源 URL 中的虚线值,并使 URL 完全限定前缀为根。

Just ensure not using any hardcoded GUIDs or IDs in the values.只要确保不在值中使用任何硬编码的 GUID 或 ID。 In this way this can be reused easily wherever needed.通过这种方式,可以在任何需要的地方轻松重复使用。

Latest: Recent version has direct OOB customization to achieve this.最新:最近的版本有直接的 OOB 定制来实现这一点。

https://www.marksgroup.net/blog/dynamics-365-related-documents-now-display-on-records-main-form/ https://www.marksgroup.net/blog/dynamics-365-related-documents-now-display-on-records-main-form/

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/add-documents-tab-entity-main-form https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/add-documents-tab-entity-main-form

在此处输入图片说明


In short: Server to Server integration approach shows physical documents in crm grid.简而言之:服务器到服务器集成方法在 crm 网格中显示物理文档。 No need of iframe solution.不需要 iframe 解决方案。

Old school List component integration has a limitation, it shows document location crm records in crm grid, so you need iframe solution to show physical docs from Sharepoint.老式列表组件集成有一个限制,它在 crm 网格中显示文档位置 crm 记录,因此您需要 iframe 解决方案来显示来自 Sharepoint 的物理文档。

[Applicable to Server based Integration] - It will show Documents in the grid. [适用于基于服务器的集成] - 它将在网格中显示文档。

Open an Entity Web form where you want to display SharePoint document library.打开要在其中显示 SharePoint 文档库的实体 Web 表单。

  1. Click on the Insert-tab, click on Sub-Grid, specify a name to sub-grid单击插入选项卡,单击子网格,为子网格指定名称
  2. In “Data Source” section select “Only related Records” from Records dropdown在“数据源”部分,从“记录”下拉列表中选择“仅相关记录”
  3. Select “Document Location (Regarding)” in Entity dropdown在实体下拉列表中选择“文档位置(关于)”
  4. Select “Active Document Location” from Default View section [shown in Below Image]从默认视图部分选择“活动文档位置”[如下图所示]
  5. Click on Set.单击设置。 Click on save then publish the customization单击保存然后发布自定义

在此处输入图片说明

Reference 参考

Update : [Applicable to List component Integration]更新【适用于List组件集成】
Associated view will show what we want but subgrid is not working as expected.关联视图将显示我们想要的内容,但子网格未按预期工作。 Upon research, this is product limitation.经过研究,这是产品限制。 Read more 阅读更多

sometimes it is desirable to have an “at a glance” view of documents associated with a record.有时需要“一目了然”地查看与记录相关的文档。 In order to view the documents in SharePoint that are related to a record, the user must navigate to a related entities area outside of the form.为了在 SharePoint 中查看与记录相关的文档,用户必须导航到表单外的相关实体区域。 (Similar to Connection, or other related entities) (类似于 Connection 或其他相关实体)

For most related entities, a sub-grid can be used in the form to display the relationships immediately on the form, but there is no simple workaround for the Documents.对于大多数相关实体,可以在表单中使用子网格来立即在表单上显示关系,但文档没有简单的解决方法。

Another alternative is showing Associated view in IFRAME.另一种选择是在 IFRAME 中显示关联视图。

EDIT : In latest Dynamics 365, CRM + Sharepoint integration using List component is deprecated.编辑:在最新的 Dynamics 365 中,不推荐使用 List 组件进行 CRM + Sharepoint 集成。 Only way is Server to Server (S2S) based CRM + Sharepoint integration is possible.唯一的方法是基于服务器到服务器 (S2S) 的 CRM + Sharepoint 集成是可能的。 This S2S approach shows documents in the associated grid & subgrid, not the doc location like in List component.这种 S2S 方法在关联的网格和子网格中显示文档,而不是像 List 组件中的文档位置。 CRM - Sharepoint wrapper taking care of conversion from CRM FetchXML to SP CAML query & give us the result we want. CRM - Sharepoint 包装器负责从 CRM FetchXML 到 SP CAML 查询的转换,并为我们提供我们想要的结果。

在此处输入图片说明

The great thing about having the documents queried by CRM is that you can create custom views of documents in the same way you would with any other entity in CRM.让 CRM 查询文档的好处在于,您可以使用与 CRM 中的任何其他实体相同的方式创建文档的自定义视图。 When using the list component the default view in SharePoint was rendered in the IFRAME meaning that to get new columns you had to have list customisation privileges on SharePoint such that all users would see the changes.使用列表组件时,SharePoint 中的默认视图在 IFRAME 中呈现,这意味着要获取新列,您必须在 SharePoint 上拥有列表自定义权限,以便所有用户都能看到更改。 With the new server to server integration you can select SharePoint columns to include in your own views and even add in your own filters using the CRM advance find interface.通过新的服务器到服务器集成,您可以选择要包含在您自己的视图中的 SharePoint 列,甚至可以使用 CRM 高级查找界面添加您自己的过滤器。

Read more . 阅读更多

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

相关问题 crm动态实体的Sharepoint文档列表 - List of Sharepoint documents for crm dynamics entity MS Access链接到Office 365 Sharepoint无效 - MS Access linking to Office 365 Sharepoint not working 使用Sharepoint Office 365显示数据 - Using Sharepoint Office 365 to display data 不带Sharepoint的MS Dynamics CRM 2013中的文档管理 - Document management in MS Dynamics CRM 2013 without Sharepoint 使用Office 365 API从SharePoint下载文档 - Download documents from SharePoint using office 365 API SharePoint 2013和Dynamics AX 2012:MS Project Server 2013的集成 - SharePoint 2013 & Dynamics AX 2012: Integration of MS Project Server 2013 如何在表单上显示 MS Access 表附件或存储在 SharePoint 位置的图像? - How do I display an MS Access Table Attachment or an image stored in a SharePoint location on a form? 显示存储在SharePoint文档文件夹中的HTML页面 - Display HTML page stored in SharePoint documents folder 基于实体的 Dynamics 365 SharePoint Online 文件夹创建。 如何为现有的 CRM 记录创建文件夹 - Dynamics 365 SharePoint Online Folder creation based on entity. How to create folder for already existing CRM records 在Sharepoint中以内容类型形式上载多个文档 - upload multiple documents in sharepoint with content type form
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM