SPRelatedFieldCollection Class

Represents a collection of SPRelatedField objects with information about the relationship between a field in a list and a lookup field in another list.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPRelatedFieldCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableTypeAttribute(Name := "RelatedFieldCollection", CollectionChildItemType := GetType(SPRelatedField),  _
    ServerTypeId := "{4703193f-e3ed-445b-8612-7c6218e0eb5a}")> _
<SubsetCallableTypeAttribute> _
Public Class SPRelatedFieldCollection _
    Inherits SPBaseCollection
'Usage
Dim instance As SPRelatedFieldCollection
[ClientCallableTypeAttribute(Name = "RelatedFieldCollection", CollectionChildItemType = typeof(SPRelatedField), 
    ServerTypeId = "{4703193f-e3ed-445b-8612-7c6218e0eb5a}")]
[SubsetCallableTypeAttribute]
public class SPRelatedFieldCollection : SPBaseCollection

Remarks

An SPRelatedFieldCollection object is returned by a call to the GetRelatedFields() method of an SPList object. The collection contains objects of type SPRelatedField. Each object in the collection contains information about the relationship between a field in the list and a lookup field in another list. For more information, see the GetRelatedFields() method and the SPRelatedField class.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPRelatedFieldCollection Members

Microsoft.SharePoint Namespace

SPList.GetRelatedFields()