SharePointのドキュメント ライブラリのカスタム フィールドをSitecoreにマップする方法について


説明

現在のSitecore SharePoint Integration Frameworkの実装では、SharePointドキュメント ライブラリ アイテムの、Blobデータを含むカスタムSharePointフィールドの同期が実施されません。

本チュートリアルでは、SitecoreのソリューションごとにSharePoint統合アイテムが1つしかない場合に、上記の機能を実装する方法について説明します。

解決策

本チュートリアルでは、PDFメディア タイプ向けのカスタムSharePointフィールドの同期を設定する方法について説明します。他にメディア タイプの場合でも同じ方法で設定することができます。

前提条件:

シナリオ:

  1. SharePoint Integration Frameworkを無効化します(App_Config\Include\配下のSharepoint.configファイル名をSharepoint.disabledに変更します)。
  2. 統合アイテムの子孫アイテムを全て削除します。
  3. カスタムのバージョン管理なしのPDFメディア テンプレートを作成します。
    /sitecore/templates/Sharepoint/Media/<Integration Name>/unversioned/Pdf
    これは、デフォルトのバージョン管理なしのPDFテンプレートと、
    /sitecore/templates/System/Media/Unversioned/Pdf
    SharePoint統合を作成する際に生成したテンプレートを継承します。
    /sitecore/templates/Sharepoint/Item Level Integration/Sharepoint Integration Items/<Integration Name>
  4. カスタムのバージョン管理ありのPDFメディア テンプレートを作成します。
    /sitecore/templates/Sharepoint/Media/<Integration Name>/versioned/Pdf
    これは、デフォルトのバージョン管理ありのPDFテンプレートと、
    /sitecore/templates/System/Media/Versioned/Pdf
    SharePoint統合を作成する際に生成したテンプレートを継承します。
    /sitecore/templates/Sharepoint/Item Level Integration/Sharepoint Integration Items/<Integration Name>
  5. 新しい設定ファイルにおいて、
    App_Config\Include\SharePoint.Media.<Integration Name>.config
    下記のコンテンツを追加します。
    <configuration>
    <sitecore>
    <mediaLibrary>
    <mediaTypes>
    <mediaType extensions="pdf">
    <sharedTemplate>Sharepoint/Media/<Integration Name>/unversioned/Pdf</sharedTemplate>
    <versionedTemplate>Sharepoint/Media/<Integration Name>/versioned/Pdf</versionedTemplate>
    </mediaType>
    </mediaTypes>
    </mediaLibrary>
    </sitecore>
    </configuration>
  6. SharePoint Integration Frameworkを有効化します(Sharepoint.disabledファイル名をSharepoint.configに変更します)。