SharePoint 集成疑难解答

备注

如果您已启用仅统一接口模式,则在使用本文中的过程之前,请执行以下操作:

  1. 在导航栏上选择设置 (齿轮按钮。)。
  2. 选择高级设置

    高级设置。

本主题介绍如何解决 SharePoint 文档管理可能出现的常见问题。

缺少文档按钮 - 验证并修复

如果客户等实体中缺少文档,请使用以下方法还原。

文档。

  1. 确保您具有 Dynamics 365 Customer Engagement (on-premises) 中的系统管理员安全角色或等效权限。 检查您的安全角色:

    1. 请按照查看用户配置文件中的步骤操作。
    2. 没有适当的权限? 请与系统管理员联系。
  2. 修复缺少的文档按钮。 请按照以下步骤进行操作:

    1. 确定文档链接应对其可见的实体(例如,客户、联系人、商机等)。
    2. 转到设置>文档管理设置
    3. 请确保您希望有文档链接(在步骤 1 中选择的)的实体已选择,并且指定了有效的 SharePoint URL。
    4. 完成向导。
    5. 验证文档按钮是否显示。

有关详细信息,请参阅对特定实体启用 SharePoint 文档管理

缺少关联文档网格 - 验证并修复

如果缺少“关联文档网格”,请使用以下方法还原。

“关联文档”网格。

“关联文档网格”未加载的最常见原因是 FetchXML 和 LayoutXML 被破坏。 这些部分被破坏可能由于很多原因。 是常见的原因是自定义实体/网格视图、添加/删除列,以及其他类似的自定义。

  1. 确保您具有系统管理员安全角色或等效权限。 检查您的安全角色:a. 请按照查看用户配置文件中的步骤操作。 b. 没有适当的权限? 请与系统管理员联系。

  2. 转到设置>自定义>解决方案

  3. 创建解决方案(指定 SharePointDocumentSolution)。 有关详细信息,请参阅创建解决方案

  4. 选择实体>添加现有>实体> 查找并添加 SharePoint 文档实体(选择所有字段、窗体、视图)。

  5. 选择保存关闭

  6. 发布所有自定义项。

  7. 选择创建的 (SharePointDocumentSolution) 解决方案。

  8. 导出解决方案并为“包类型”选择“非托管”。 将下载 SharePointDocumentSolution.zip。

  9. 提取 zip 文件(步骤 8 中下载的文件)

  10. 浏览文件夹,找到并打开 customization.xml。

  11. 搜索关联文档网格的 LayoutXml(搜索关联文档)。

    搜索“关联文档”。

  12. 对 LayoutXML 部分进行如下更改:

    <layoutxml>
      <grid name="sharepointdocument" jump="fullname" select="1" icon="0" preview="1">
        <row name="sharepointdocument" id="sharepointdocumentid">
          <cell name="fullname" width="300" imageproviderfunctionname="DocumentManagement.FileTypeIcon.loadSharePointFileTypeIcon" imageproviderwebresource="$webresource:SharePoint_main_system_library.js" />
          <cell name="relativelocation" width="200" />
          <cell name="modified" width="150" />
          <cell name="sharepointmodifiedby" width="150" />
          <cell name="sharepointcreatedon" width="300" />
          <cell name="title" ishidden="1" />
          <cell name="readurl" ishidden="1" />
          <cell name="editurl" ishidden="1" />
          <cell name="author" ishidden="1" />
          <cell name="absoluteurl" ishidden="1" />
          <cell name="filetype" ishidden="1" />
          <cell name="ischeckedout" ishidden="1" />
          <cell name="locationid" ishidden="1" />
          <cell name="iconclassname" ishidden="1" />
        </row>
      </grid>
    </layoutxml>
    
  13. 对 FetchXml 部分进行如下更改:

    <fetch distinct="false" mapping="logical">
      <entity name="sharepointdocument">
        <attribute name="documentid" />
        <attribute name="fullname" />
        <attribute name="relativelocation" />
        <attribute name="sharepointcreatedon" />
        <attribute name="ischeckedout" />
        <attribute name="filetype" />
        <attribute name="modified" />
        <attribute name="sharepointmodifiedby" />
        <attribute name="servicetype" />
        <attribute name="absoluteurl" />
        <attribute name="title" />
        <attribute name="author" />
        <attribute name="sharepointdocumentid" />
        <attribute name="readurl" />
        <attribute name="editurl" />
        <attribute name="locationid" />
        <attribute name="iconclassname" />
        <order attribute="relativelocation" descending="false" />
        <filter>
          <condition attribute="isrecursivefetch" operator="eq" value="0" />
        </filter>
      </entity>
    </fetch>
    

重要提示

在布局 xml 中配置的所有属性都要求它们相应的各自属性出现在 Fetch XML 中。 当此配置不正确时,网格将导致错误。

  1. 保存文件。
  2. 压缩文件夹。
  3. 打开 Dynamics 365 for Customer Engagement。
  4. 导航到设置>解决方案
  5. 导入解决方案(在步骤 8 中解压缩的文件)。
  6. 发布所有自定义项。
  7. 验证“关联文档网格”是否在所有必需的 SharePoint 文档中显示。

验证并修复 SharePoint 网站 URL

在 Customer Engagement (on-premises) 中,SharePoint 网站和文档位置记录包含指向网站集、网站、文档库和 SharePoint 的文件夹的链接。 这些网站和文档位置记录与 Customer Engagement (on-premises) 记录相关联,这样 Customer Engagement (on-premises) 记录的文档就可以存储在 SharePoint 中。

当 Customer Engagement (on-premises) 和 SharePoint 间的链接中断时,您必须验证和修复链接,这样 Customer Engagement (on-premises) 记录就可以继续指向正确的文档库和文件夹,以便管理文档。

  1. 确保您具有 Microsoft Dynamics 365 中的系统管理员安全角色或等效权限。

    检查您的安全角色

  2. 查找和修复 URL。 为此,请执行以下步骤。

    1. 转到设置>文档管理

    2. 单击SharePoint 站点

    3. 选择要验证的网站 URL,然后单击或点按验证

  3. Customer Engagement (on-premises) 会验证所有选择的网站的 URL 和它们的即时从网站和文档库的 URL。 然后在验证网站中显示结果。

  4. 若要修复 URL,请打开网站记录,然后输入正确的 URL。 详细信息:创建或编辑网站记录

  5. 单击保存并关闭

用户收到“您无权查看此位置的文件”消息

当重命名了配置有文档管理的 SharePoint 站点,但是尚未更新 SharePoint 站点 URL 记录以体现更改时,可能出现此错误消息。

  1. 转到设置>文档管理>SharePoint 站点

  2. 打开已重命名的 SharePoint 站点记录,然后输入包含新 URL 的绝对 URL

    输入 SharePoint 的相对 URL。

  3. 选择保存并关闭

格式错误的 FetchXML 或 LayoutXML - 验证和修复

格式错误的 FetchXML 或 LayoutXML 可能会导致以下问题:

  • 缺少关联文档网格
  • 无法查看文件夹
  • 无法查看文件夹中的文档
  • 未在删除文档
  • 错误消息 –“所需参数为 null 或未定义:url”,打开文档选项卡时
  • 错误消息 –“System.NullReferenceException”,上载文档时
  • 正在下载文档,而不是在新选项卡中打开

FetchXML 或 LayoutXML 格式错误的原因可能有多种。 是常见的原因是自定义实体/网格视图、添加/删除列,以及其他类似的自定义。

如果 FetchXML 或 LayoutXML 格式错误,请使用以下方法进行还原。

  1. 确保您具有系统管理员安全角色或等效权限。 检查您的安全角色:

    1. 请按照查看用户配置文件中的步骤操作。
    2. 没有适当的权限? 请与系统管理员联系。
  2. 在 Web 应用中,转到设置 (设置。) >高级设置,转到设置>自定义>解决方案

  3. 创建解决方案(指定 SharePointDocumentSolution)。 有关详细信息,请参阅创建解决方案

  4. 选择实体>添加现有>实体> 查找并添加 SharePoint 文档实体(选择所有字段、窗体、视图)。

  5. 选择保存关闭

  6. 发布所有自定义项。

  7. 选择创建的 (SharePointDocumentSolution) 解决方案。

  8. 导出解决方案并为“包类型”选择“非托管”。 将下载 SharePointDocumentSolution.zip。

  9. 从组织中删除您在步骤 3 中创建的解决方案。

  1. 提取导出的解决方案 zip 文件(步骤 8 中下载的文件)。

  2. 在解决方案内容文件夹中,找到并打开 Solution.xml

  3. 更改 Solution.xml 中的以下值,然后保存。
    <Managed>0</Managed><Managed>1</Managed>

  4. 在解决方案内容文件夹中,找到并打开 customization.xml

  5. 搜索其中的 savedqueryid 属性等于“0016f9f3-41cc-4276-9d11-04308d15858d”的 <SavedQuery> 元素。

  6. 如果您找不到具有在上一步中指定的 ID 的已保存查询,请转到步骤 19。 但是,如果在步骤 14 中找到的 <SavedQuery> 元素类似于 <SavedQuery unmodified="1">,请移除 unmodified="n" 属性。

  7. 搜索关联文档网格的 layoutxml(搜索关联文档)。

    搜索“关联文档”。

  8. 对 layoutxml 部分进行下面指示的更改:

    <layoutxml>
     <grid name="sharepointdocument" object="9507" jump="fullname" select="1" icon="0" preview="1">
      <row name="sharepointdocument" id="sharepointdocumentid">
            <cell name="fullname" width="300" imageproviderfunctionname="DocumentManagement.FileTypeIcon.loadSharePointFileTypeIcon" imageproviderwebresource="$webresource:SharePoint_main_system_library.js" />
            <cell name="modified" width="150" />
            <cell name="sharepointmodifiedby" width="150" />
            <cell name="locationname" width="150" /> 
            <cell name="relativelocation" width="200" />
            <cell name="servicetype" width="90" />
            <cell name="documentid" ishidden="1" />
            <cell name="title" ishidden="1" />
            <cell name="author" ishidden="1" />
            <cell name="sharepointcreatedon" ishidden="1" />
            <cell name="sharepointdocumentid" ishidden="1" />
            <cell name="filetype" ishidden="1" />
            <cell name="readurl" ishidden="1" />
            <cell name="editurl" ishidden="1" />
            <cell name="ischeckedout" ishidden="1" />
            <cell name="absoluteurl" ishidden="1" />
            <cell name="locationid" ishidden="1" />
            <cell name="iconclassname" ishidden="1" />
      </row>
     </grid>
    </layoutxml>
    

    重要提示

    布局 xml 中配置的所有属性要求 Fetch XML 中包含各相应属性。 当配置不正确时,网格将返回错误。

  9. 对 FetchXml 部分进行如下更改:

    <fetch distinct="false" mapping="logical">
      <entity name="sharepointdocument">
        <attribute name="documentid" />
        <attribute name="fullname" />
        <attribute name="relativelocation" />
        <attribute name="sharepointcreatedon" />
        <attribute name="ischeckedout" />
        <attribute name="filetype" />
        <attribute name="modified" />
        <attribute name="sharepointmodifiedby" />
        <attribute name="servicetype" />
        <attribute name="absoluteurl" />
        <attribute name="title" />
        <attribute name="author" />
        <attribute name="sharepointdocumentid" />
        <attribute name="readurl" />
        <attribute name="editurl" />
        <attribute name="locationid" />
        <attribute name="iconclassname" />
        <attribute name="locationname" /> 
        <order attribute="relativelocation" descending="false" />
        <filter>
          <condition attribute="isrecursivefetch" operator="eq" value="0" />
        </filter>
      </entity>
    </fetch>
    
  10. 同样,搜索其中的 savedqueryid 属性等于“a5b008ac-07d9-4554-8509-2c05767bff51”的 <SavedQuery> 元素。

  11. 如果您找不到具有在上一步中指定的 ID 的已保存查询,请转到步骤 24。 但是,如果在步骤 19 中找到的 <SavedQuery> 元素类似于 <SavedQuery unmodified="1">,请移除 unmodified="n" 属性。

  12. 在 layoutxml 中搜索“所有 SharePoint 文档”(搜索所有 SharePoint 文档)。

    在 layoutxml 中搜索“所有 SharePoint 文档”。

  13. 对 layoutxml 部分进行下面指示的更改:

    <layoutxml>
      <grid name="sharepointdocument" jump="fullname" select="1" icon="0" preview="1">
        <row name="sharepointdocument" id="sharepointdocumentid">
          <cell name="fullname" width="300" imageproviderfunctionname="DocumentManagement.FileTypeIcon.loadSharePointFileTypeIcon" imageproviderwebresource="$webresource:SharePoint_main_system_library.js" />
          <cell name="relativelocation" width="200" />
          <cell name="modified" width="150" />
          <cell name="sharepointmodifiedby" width="150" />
          <cell name="sharepointcreatedon" width="300" />
          <cell name="documentid" ishidden="1" />
          <cell name="title" ishidden="1" />
          <cell name="readurl" ishidden="1" />
          <cell name="editurl" ishidden="1" />
          <cell name="author" ishidden="1" />
          <cell name="absoluteurl" ishidden="1" />
          <cell name="sharepointdocumentid" ishidden="1" />
          <cell name="filetype" ishidden="1" />
          <cell name="ischeckedout" ishidden="1" />
          <cell name="locationid" ishidden="1" />
          <cell name="iconclassname" ishidden="1" />
        </row>
      </grid>
    </layoutxml>
    
  14. 对 FetchXml 部分进行如下更改:

    <fetch distinct="false" mapping="logical">
      <entity name="sharepointdocument">
        <attribute name="documentid" />
        <attribute name="fullname" />
        <attribute name="relativelocation" />
        <attribute name="sharepointcreatedon" />
        <attribute name="filetype" />
        <attribute name="absoluteurl" />
        <attribute name="modified" />
        <attribute name="sharepointmodifiedby" />
        <attribute name="title" />
        <attribute name="readurl" />
        <attribute name="editurl" />
        <attribute name="author" />
        <attribute name="sharepointdocumentid" />
        <attribute name="ischeckedout" />
        <attribute name="locationid" />
        <attribute name="iconclassname" />
        <filter>
          <condition attribute="isrecursivefetch" operator="eq" value="1" />
        </filter>
        <order attribute="relativelocation" descending="false" />
      </entity>
    </fetch>
    
  15. 同样,搜索其中的 savedqueryid 属性等于“cb177797-b2ac-42a8-9773-5412321a965c”的 <SavedQuery> 元素。

  16. 如果您找不到具有在上一步中指定的 ID 的已保存查询,请转到步骤 29。 但是,如果在步骤 24 中找到的 <SavedQuery> 元素类似于 <SavedQuery unmodified="1">,请移除 unmodified="n" 属性。

  17. 在 layoutxml 中搜索“OneNote SharePoint 文档”(搜索 OneNote SharePoint 文档)。

    在 layoutxml 中搜索“OneNote SharePoint 文档”。

  18. 对 layoutxml 部分进行下面指示的更改:

    <layoutxml>
      <grid name="sharepointdocument" jump="fullname" select="1" icon="0" preview="1">
        <row name="sharepointdocument" id="sharepointdocumentid">
          <cell name="fullname" width="300" imageproviderfunctionname="DocumentManagement.FileTypeIcon.loadSharePointFileTypeIcon" imageproviderwebresource="$webresource:SharePoint_main_system_library.js" />
          <cell name="relativelocation" width="200" />
          <cell name="modified" width="150" />
          <cell name="sharepointmodifiedby" width="150" />
          <cell name="sharepointcreatedon" width="300" />
          <cell name="title" ishidden="1" />
          <cell name="readurl" ishidden="1" />
          <cell name="editurl" ishidden="1" />
          <cell name="author" ishidden="1" />
          <cell name="absoluteurl" ishidden="1" />
          <cell name="filetype" ishidden="1" />
          <cell name="ischeckedout" ishidden="1" />
          <cell name="locationid" ishidden="1" />
          <cell name="iconclassname" ishidden="1" />
        </row>
      </grid>
    </layoutxml>
    
  19. 对 FetchXml 部分进行如下更改:

    <fetch distinct="false" mapping="logical">
      <entity name="sharepointdocument">
        <attribute name="documentid" />
        <attribute name="fullname" />
        <attribute name="relativelocation" />
        <attribute name="sharepointcreatedon" />
        <attribute name="filetype" />
        <attribute name="modified" />
        <attribute name="sharepointmodifiedby" />
        <attribute name="title" />
        <attribute name="readurl" />
        <attribute name="editurl" />
        <attribute name="author" />
        <attribute name="absoluteurl" />
        <attribute name="ischeckedout" />
        <attribute name="locationid" />
        <attribute name="iconclassname" />
        <filter type="and">
          <condition attribute="documentlocationtype" operator="eq" value="1" />
          <condition attribute="isrecursivefetch" operator="eq" value="0" />
          <filter type="or">
            <condition attribute="filetype" operator="eq" value="one" />
            <condition attribute="filetype" operator="eq" value="onetoc2" />
          </filter>
        </filter>
        <order attribute="sharepointcreatedon" descending="true" />
      </entity>
    </fetch>
    
  20. 保存文件。

  21. 压缩文件夹。

  22. 打开 Dynamics 365 中的一个模型驱动应用。

  23. 导航到设置>解决方案

  24. 导入解决方案(在步骤 8 中解压缩的文件)。

  25. 发布所有自定义项。

  26. 验证是否已解决与格式错误的 FetchXML 或 LayoutXML 相关联的所有问题。 例如,验证“关联文档网格”是否在所有必需的 SharePoint 文档中显示。

另请参见

基于服务器的身份验证疑难解答