Helper.CreatedBy Method (WorkflowContext, String, SPItemKey, String)
Retrieves the name of the creator of a list item and compares it to a specified name. If the values match the method returns true.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function CreatedBy ( _
context As WorkflowContext, _
listId As String, _
listItem As SPItemKey, _
name As String _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listId As String
Dim listItem As SPItemKey
Dim name As String
Dim returnValue As Boolean
returnValue = Helper.CreatedBy(context, _
listId, listItem, name)
public static bool CreatedBy(
WorkflowContext context,
string listId,
SPItemKey listItem,
string name
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA WorkflowContext object that contains properties that are associated with the active workflow instance.
listId
Type: System.StringA string value representing the GUID of the list. This value may also be the list display name.
listItem
Type: Microsoft.SharePoint.Workflow.SPItemKeyAn integer that represents a specific list item.
name
Type: System.StringThe name value that should be compared.
Return Value
Type: System.Boolean
true if name is the name of the creator of the specified list item; otherwise, false.