Share via


AssociationReferenceCollection.Create Method

Creates an Association reference.

Namespace:  Microsoft.SharePoint.BusinessData.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Create ( _
    associationName As String, _
    entityReference As EntityReference, _
    isReverse As Boolean _
) As AssociationReference
'Usage
Dim instance As AssociationReferenceCollection
Dim associationName As String
Dim entityReference As EntityReference
Dim isReverse As Boolean
Dim returnValue As AssociationReference

returnValue = instance.Create(associationName, _
    entityReference, isReverse)
public AssociationReference Create(
    string associationName,
    EntityReference entityReference,
    bool isReverse
)

Parameters

  • associationName
    Type: System.String

    The name of the Association to reference.

  • isReverse
    Type: System.Boolean

    true if the referenced Association is reverse in this AssociationGroup; otherwise, false. See: IsReverse.

Return Value

Type: Microsoft.SharePoint.BusinessData.Administration.AssociationReference
The created Association reference.

Exceptions

Exception Condition
ArgumentNullException

associationName is a null reference (Nothing in Visual Basic) or empty or entityReference is a null reference (Nothing in Visual Basic).

Remarks

This method may return any of the following exceptions: AccessDeniedException, ConcurrentModificationException, DuplicateMetadataObjectException, ExceededMetadataObjectLimitException, and InvalidateOperationException.

See Also

Reference

AssociationReferenceCollection Class

AssociationReferenceCollection Members

Microsoft.SharePoint.BusinessData.Administration Namespace