Share via


ActivityTemplatesCollection.CreateKey Method

Static method that creates a key that enables searching within an ActivityTemplatesCollection object.

Namespace:  Microsoft.Office.Server.ActivityFeed
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
Public Shared Function CreateKey ( _
    isMultivalued As Boolean _
) As String
'Usage
Dim isMultivalued As Boolean
Dim returnValue As String

returnValue = ActivityTemplatesCollection.CreateKey(isMultivalued)
public static string CreateKey(
    bool isMultivalued
)

Parameters

  • isMultivalued
    Type: System.Boolean

    A value indicating whether the ActivityTemplate defines display for multiple values.

Return Value

Type: System.String

Remarks

Use this method to create a key before creating a new ActivityTemplate, as in the following example.

ActivityTemplate atemp = atype.ActivityTemplates[ActivityTemplatesCollection.CreateKey(true)];
if (atemp == null)
{
    atemp = atype.ActivityTemplates.Create(true);
    atemp.Commit();
    atemp.Refresh(false);
}

See Also

Reference

ActivityTemplatesCollection Class

ActivityTemplatesCollection Members

Microsoft.Office.Server.ActivityFeed Namespace