Compartilhar via


SPList.GetRelatedFields Method (SPRelationshipDeleteBehavior)

Gets a collection of objects with information about a lookup field in another list that points to a field in this list, depending upon the specified deletion constraint.

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

Syntax

'Declaration
Public Function GetRelatedFields ( _
    deleteBehavior As SPRelationshipDeleteBehavior _
) As SPRelatedFieldCollection
'Usage
Dim instance As SPList
Dim deleteBehavior As SPRelationshipDeleteBehavior
Dim returnValue As SPRelatedFieldCollection

returnValue = instance.GetRelatedFields(deleteBehavior)
public SPRelatedFieldCollection GetRelatedFields(
    SPRelationshipDeleteBehavior deleteBehavior
)

Parameters

Return Value

Type: Microsoft.SharePoint.SPRelatedFieldCollection
A collection of information about a lookup field on a child list that gets information from a parent list.

Remarks

You can use the GetRelatedFields method to discover which fields in the current list are targets of lookup fields in other lists, including lists in other websites. Use this overload to narrow the query to lookup fields that place a specific constraint on deletion of items in the current list.

See Also

Reference

SPList Class

SPList Members

GetRelatedFields Overload

Microsoft.SharePoint Namespace

SPRelatedField

SPFieldLookup

SPRelationshipDeleteBehavior