Bagikan melalui


EntityMetadata.PrimaryNameAttribute Property

 

Applies To: Dynamics CRM 2015

Gets the name of the primary attribute for an entity.

Namespace:   Microsoft.Xrm.Sdk.Metadata
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

[DataMemberAttribute]
public string PrimaryNameAttribute { get; internal set; }
public:
[DataMemberAttribute]
property String^ PrimaryNameAttribute {
    String^ get();
    internal: void set(String^ value);
}
[<DataMemberAttribute>]
member PrimaryNameAttribute : string with get, internal set
<DataMemberAttribute>
Public Property PrimaryNameAttribute As String
    Get
    Friend Set
End Property

Property Value

Type: System.String

Type: String
The name of the primary attribute for an entity..

Remarks

Each entity that contains records that can appear in the application will have a primary attribute. Each custom entity will have a primary attribute. The default name for the primary attribute is ‘name’ and this is the most common value for PrimaryNameAttribute. The value in the corresponding attribute is the value that will appear in a lookup attribute when that record is selected. Many entities do not appear in the application and do not have a value set for PrimaryNameAttribute.

See Also

EntityMetadata Class
Microsoft.Xrm.Sdk.Metadata Namespace

Return to top

© 2016 Microsoft. All rights reserved. Copyright