CrmTypes.CreateKeyProperty Method
Creates an instance of a Key attribute represented as a dynamic entity.
Syntax
[Visual Basic .NET]
Public Shared Function CreateKeyProperty(
ByVal name As String,
ByVal value As Key
) As KeyProperty
[C#]
public static KeyProperty CreateKeyProperty(
string name,
Key value
);
[JScript]
public static function CreateKeyProperty(
name : String,
value : Key
) : KeyProperty;
Parameters
name
Specifies the name of the attribute.
value
Specifies the value of the attribute.
Return Value
Returns a KeyProperty type.
Example
[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Create the KeyProperty.
KeyProperty keyProp = CrmSdk.CrmTypes.CreateKeyProperty(
"leadid",
user.UserId);
See Also