CrmTypes.CreateOwner Method
Creates an instance of a Owner attribute.
Syntax
[Visual Basic .NET]
Public Shared Function CreateOwner(
ByVal type As String,
ByVal value As Guid
) As Owner
[C#]
public static Owner CreateOwner(
string type,
Guid value
);
[JScript]
public static function CreateOwner(
type : String,
value : Guid
) : Owner;
Parameters
type
Specifies the schema name of the entity to create.
value
Specifies the value of the attribute.
Return Value
Returns an Owner type.
Example
[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials
= System.Net.CredentialCache.DefaultCredentials;
// Create the Owner attribute.
Owner owner
= CrmSdk.CrmTypes.CreateOwner(
EntityName.systemuser.ToString(),
user.UserId);
See Also