共用方式為


疑難排解 SharePoint 整合

本主題說明如何修正 SharePoint 文件管理可能會發生的常見問題。

遺失 [文件] 按鈕 - 驗證並修正

如果實體 (例如客戶) 中沒有看到文件,請使用下列方式來還原。

文件。

  1. 請確保您擁有系統管理員資訊安全角色或相等的權限。 檢查資訊安全角色:a. 請依照檢視使用者設定檔中的步驟進行。 b. 沒有正確的權限嗎? 請連絡您的系統管理員。

  2. 修正遺失文件按鈕。 請執行下列步驟:

    1. 找出原本可看到文件連結的實體 (例如,客戶、連絡人、商機...等)。
    2. 移至設定>文件管理設定
    3. 確定已選取您希望有文件連結的實體 (已於步驟 1 中選取),並且已指定有效的 SharePoint URL。
    4. 完成精靈。
    5. 確認文件按鈕出現。

如需詳細資訊,請參閱啟用特定實體的 SharePoint 文件管理

格式錯誤的 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 中建立的解決方案。

  10. 解壓縮匯出的解決方案 zip 檔案 (從步驟 8 下載的檔案)。

  11. 在解決方案內容資料夾中,找到然後開啟 Solution.xml

  12. Solution.xml 中變更下列值,然後加以儲存。
    <Managed>0</Managed> 變更為 <Managed>1</Managed>

  13. 在解決方案內容資料夾中,找到然後開啟 customization.xml

  14. 搜尋 <SavedQuery> 元素,其中 savedqueryid 屬性等於 "0016f9f3-41cc-4276-9d11-04308d15858d"。

  15. 如果您使用先前步驟中指定的 ID 找不到儲存的查詢,請移至步驟 19。 不過,如果步驟 14 中找到的 <SavedQuery>元素,與 <SavedQuery unmodified="1"> 類似,請移除 unmodified="n" 屬性。

  16. 搜尋文件相關格線的 layoutxml (搜尋 Document Associated)。

    搜尋相關文件。

  17. 如下所示,對 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 中。 當這項設定不正確時,格線將會傳回錯誤。

  18. 進行變更,如下方 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>
    
  19. 類似搜尋 <SavedQuery> 元素,其中 savedqueryid 屬性等於 "a5b008ac-07d9-4554-8509-2c05767bff51"。

  20. 如果您使用先前步驟中指定的 ID 找不到儲存的查詢,請移至步驟 24。 不過,如果步驟 19 中找到的 <SavedQuery>元素,與 <SavedQuery unmodified="1"> 類似,請移除 unmodified="n" 屬性。

  21. 搜尋所有 SharePoint 檔案的 layoutxml (搜尋所有 SharePoint 檔案)。

    搜尋所有 SharePoint 文件的 layoutxml。

  22. 如下所示,對 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>
    
  23. 進行變更,如下方 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>
    
  24. 類似搜尋 <SavedQuery> 元素,其中 savedqueryid 屬性等於 "cb177797-b2ac-42a8-9773-5412321a965c"。

  25. 如果您使用先前步驟中指定的 ID 找不到儲存的查詢,請移至步驟 29。 不過,如果步驟 24 中找到的 <SavedQuery>元素,與 <SavedQuery unmodified="1"> 類似,請移除 unmodified="n" 屬性。

  26. 搜尋 OneNote SharePoint 檔案的 layoutxml(搜尋 OneNote SharePoint 檔案)。

    搜尋所有 OneNote SharePoint 文件的 layoutxml。

  27. 如下所示,對 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>
    
  28. 進行變更,如下方 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>
    
  29. 儲存檔案。

  30. 壓縮資料夾。

  31. 在 Dynamics 365 中開啟模型導向應用程式。

  32. 瀏覽至設定>解決方案

  33. 匯入解決方案 (步驟 8 中壓縮的檔案)。

  34. 發行所有自訂。

  35. 確認所有與格式錯誤的 FetchXML 或 LayoutXML 相關的問題是否皆已解決。 例如,確認顯示在所有的必要 SharePoint 文件中與文件相關的格線。

驗證和修正 SharePoint 網站 URL

在客戶參與應用程式 (例如 Dynamics 365 Sales 和 Customer Service) 中,SharePoint 網站和文件位置記錄包含網站集合、網站、文件庫和 SharePoint 中的資料夾連結。 這些網站和文件位置記錄會與記錄相關聯,這樣記錄的文件才會儲存在 SharePoint 中。

當客戶參與應用程式與 SharePoint 之間的連結破壞時,您必須驗證和修正連結,記錄才能繼續指向正確的文件庫和資料夾管理文件。

  1. 請確保您在 Microsoft Dynamics 365 中擁有系統管理員資訊安全角色或相等的權限。

    檢查資訊安全角色

  2. 找出並修正 URL。 若要這麼做,請執行下列步驟。

    1. 移至設定>文件管理

    2. 按一下 SharePoint 網站

    3. 選取您要驗證的網站 URL,然後按一下或點選驗證

  3. 客戶參與應用程式驗證所有選取的網站 URL 及其直屬網站和文件庫 URL。 然後會在驗證網站中顯示結果。

  4. 若要修正 URL,請開啟網站記錄,然後輸入正確的 URL。 其他資訊:建立或編輯網站記錄

  5. 按一下儲存後關閉

使用者收到「您沒有檢視此位置中檔案的權限」訊息

當透過文件管理設定的 SharePoint 網站已重新命名,但 SharePoint 網站 URL 記錄尚未更新以反映變更時,可能會出現此錯誤訊息。

  1. 移至設定>文件管理>SharePoint 網站

  2. 開啟已重新命名的 SharePoint 網站記錄,並以新的 URL 輸入絕對 URL

    輸入 SharePoint 相對 URL。

  3. 選取儲存並關閉

另請參閱

疑難排解伺服器架構驗證