Helper.CreatedBy Method (WorkflowContext, String, Int32, String)
Finds the creator of the specified SharePoint Foundation list item and compares it to a specified name.
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 Integer, _
name As String _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listId As String
Dim listItem As Integer
Dim name As String
Dim returnValue As Boolean
returnValue = Helper.CreatedBy(context, _
listId, listItem, name)
public static bool CreatedBy(
WorkflowContext context,
string listId,
int listItem,
string name
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextWorkflowContext object that contains properties that are associated with the active workflow instance.
listId
Type: System.StringA string that represents the GUID of the SharePoint Foundation list identifier (ID). May also be the display name of the list.
listItem
Type: System.Int32An integer that represents the SharePoint Foundation list item in a specified list.
name
Type: System.StringA name that is compared with the CreatedBy field of the SharePoint Foundation list item. The name provided in this field is compared to the SPUser.LoginName property for the user who created the item.
Return Value
Type: System.Boolean
true if the name provided matches the creator of the list item; otherwise, the value is false.