Share via


CrmTypes.CreateEntityNameReferenceProperty Method

banner art

Creates an instance of an entity name reference attribute represented as a dynamic entity.

Syntax

[Visual Basic .NET]
Public Shared Function CreateEntityNameReferenceProperty(
  ByVal name As String,
  ByVal value As EntityNameReference
) As EntityNameReferenceProperty

[C#]
public static EntityNameReferenceProperty CreateEntityNameReferenceProperty(
  string  name,
  EntityNameReference  value
);

[JScript]
public static function CreateEntityNameReferenceProperty(
  name : String,
  value : EntityNameReference
) : EntityNameReferenceProperty;

Parameters

name

Specifies the name of the attribute.

value

Specifies the value of the attribute.

Return Value

Returns an EntityNameReferenceProperty type.

Example

// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the EntityNameReferenceProperty.
EntityNameReferenceProperty referenceProp 
          = CrmSdk.CrmTypes.CreateEntityNameReferenceProperty(
            "objecttypecode",
            EntityName.systemuser.ToString());

See Also

© 2007 Microsoft Corporation. All rights reserved.