これが現在のシナリオです。
XXX という中央サイトがあります。
2012、2011、2010 などの年名で呼ばれるサブサイトが多数あります。
中央サイトには、受益者というリストがあります。
すべての年のサイトに Request というリストがあります。これらのリストのすべてに、中央サイトの受益者リストへのルックアップ列があります。
セントラル サイトに 1 つの Web パーツを作成して、受益者がすべてのサブ サイトに持つすべてのリクエストを表示する必要があります。(年サイト)。spquery を使用するのではなく、spsitedataquery を使用する必要があると思うので、contentquery Web パーツが機能するかどうか疑問に思います。
これは私がこれまでに持っているコードです。
/// <summary>
/// Update dashboard beneficieries.
/// </summary>
/// <param name="currentUnsafeWeb"></param>
private void UpdateDashboardBeneficiaries(SPWeb currentUnsafeWeb)
{
Logger.LogDebug("NLSubsidiesSiteConfigSubsidyCentralEventReceiver", "UpdateDashboardBeneficiaries(SPWeb currentUnsafeWeb)", "BEGIN");
SPFile page = null;
try
{
page = currentUnsafeWeb.GetFile("beneficiaries.aspx");
page.CheckOut();
//Add Content Query WebPart or something else to show all request in all yearsubsites that are related to the beneficiaries list.
page.CheckIn(string.Empty);
}
catch (Exception)
{
if (page != null) page.UndoCheckOut();
throw;
}
Logger.LogDebug("NLSubsidiesSiteConfigSubsidyCentralEventReceiver", "ConfigureDashboardBeneficiaries(SPWeb currentWeb)", "END");
}