FieldLookup.PrimaryFieldId - Propriété
Gets or sets a value that specifies the primary lookup field identifier if this is a dependent lookup field Otherwise, it is an empty string.
Espace de noms : Microsoft.SharePoint.Client
Assemblys : Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)
Syntaxe
'Déclaration
Public Property PrimaryFieldId As String
Get
Set
'Utilisation
Dim instance As FieldLookup
Dim value As String
value = instance.PrimaryFieldId
instance.PrimaryFieldId = value
public string PrimaryFieldId { get; set; }
Valeur de propriété
Type : System.String
Returns a String instance representing the primary lookup field identifier.
Exceptions
Exception | Condition |
---|---|
[Microsoft.SharePoint.SPException] | Not a valid GUID. Error code: -2146232832. |
[System.NotSupportedException] | When the list that this field belongs to is an external list. Error code: -1. |
Remarques
When you create a multiple column lookup, the primary field is the FieldLookup object that establishes the relationship with the source list. One or more secondary fields depend on the primary field for the relationship to the source list.
If the current SPFieldLookup object's IsDependentLookup() property returns true, then the current object is a secondary field and its PrimaryFieldId property will return the string representation of the GUID that identifies the primary lookup field on which it depends.