Share via


CrmTypes.CreateOwnerProperty Method

banner art

Creates an instance of an Owner attribute represented as a dynamic entity.

Syntax

[Visual Basic .NET]
Public Shared Function CreateOwnerProperty(
  ByVal name As String,
  ByVal value As Owner
) As OwnerProperty

[C#]
public static OwnerProperty CreateOwnerProperty(
  string  name,
  Owner  value
);

[JScript]
public static function CreateOwnerProperty(
  name : String,
  value : Owner
) : OwnerProperty;

Parameters

name

Specifies the name of the attribute.

value

Specifies the value of the attribute.

Return Value

Returns an OwnerProperty type.

Example

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

// Create the OwnerProperty.
OwnerProperty ownerProp 
       = CrmSdk.CrmTypes.CreateOwnerProperty(
                   "ownerid",
                   EntityName.systemuser.ToString(),
                   user.UserId);

See Also

© 2007 Microsoft Corporation. All rights reserved.