Export (0) Print
Expand All

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)

'Declaration
PublicFunctionGetRelatedFields ( _
	deleteBehaviorAsSPRelationshipDeleteBehavior _
) AsSPRelatedFieldCollection
'Usage
DiminstanceAsSPListDimdeleteBehaviorAsSPRelationshipDeleteBehaviorDimreturnValueAsSPRelatedFieldCollectionreturnValue = instance.GetRelatedFields(deleteBehavior)

Parameters

deleteBehavior
Type: Microsoft.SharePoint.SPRelationshipDeleteBehavior

An enumeration value that specifies a deletion constraint to use as a filter.

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.

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.

Show:
© 2014 Microsoft