Share via


Helper.LookupUser method (WorkflowContext, Guid, Int32, String)

Retrieves a user login name from a field for a specified SharePoint Foundation list item when the list GUID is known.

Namespace:  Microsoft.SharePoint.WorkflowActions
Assembly:  Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)

Syntax

'Declaration
Public Shared Function LookupUser ( _
    context As WorkflowContext, _
    listId As Guid, _
    listItem As Integer, _
    fieldName As String _
) As String
'Usage
Dim context As WorkflowContext
Dim listId As Guid
Dim listItem As Integer
Dim fieldName As String
Dim returnValue As String

returnValue = Helper.LookupUser(context, _
    listId, listItem, fieldName)
public static string LookupUser(
    WorkflowContext context,
    Guid listId,
    int listItem,
    string fieldName
)

Parameters

  • listId
    Type: System.Guid

    The GUID of the SharePoint Foundation list.

  • listItem
    Type: System.Int32

    An integer that represents the SharePoint Foundation list item in a specified list.

  • fieldName
    Type: System.String

    A string that represents the name of the field in the list from which you want to retrieve a user login name.

Return value

Type: System.String
A user logon name from the specified field.

Remarks

The LookupUser method reads the value of the specified field and stores it as an object. Then it modifies or casts the value of the object, depending on the SPFieldType of that field.

See also

Reference

Helper class

Helper members

LookupUser overload

Microsoft.SharePoint.WorkflowActions namespace