RelatedField クラス
Specifies a relationship to a lookup field.
継承階層
System.Object
Microsoft.SharePoint.Client.ClientObject
Microsoft.SharePoint.Client.RelatedField
名前空間: Microsoft.SharePoint.Client
アセンブリ: Microsoft.SharePoint.Client.Silverlight (Microsoft.SharePoint.Client.Silverlight.dll 内); Microsoft.SharePoint.Client.Phone (Microsoft.SharePoint.Client.Phone.dll 内) Microsoft.SharePoint.Client (Microsoft.SharePoint.Client.dll 内)
構文
'宣言
Public Class RelatedField _
Inherits ClientObject
'使用
Dim instance As RelatedField
public class RelatedField : ClientObject
例
This code example displays the identifier of fields related to the Tasks list of the specified site.
using System;
using Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointFoundation.Samples
{
class RelatedFieldExample
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web site = clientContext.Web;
List targetList = site.Lists.GetByTitle("Tasks");
// Get a collection of lookup fields that use this list as a data source
// and that have FieldLookup.IsRelationship set to true.
RelatedFieldCollection collRelatedField = targetList.GetRelatedFields();
clientContext.Load(collRelatedField);
clientContext.ExecuteQuery();
foreach (RelatedField relField in collRelatedField)
Console.WriteLine("Related Field ID: {0}", relField.FieldId);
}
}
}
スレッド セーフ
この型のパブリック static (Visual Basic のShared ) メンバーはいずれもスレッド セーフです。インスタンス メンバーはスレッド セーフになるという保証はありません。