Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Checks whether the specified user has any work items for any of the specified work item types.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function DoesUserHaveWorkItems ( _
userId As Integer, _
contentDb As SPContentDatabase, _
ParamArray workItemTypes As Guid() _
) As Boolean
'Usage
Dim userId As Integer
Dim contentDb As SPContentDatabase
Dim workItemTypes As Guid()
Dim returnValue As Boolean
returnValue = SPWorkItemCollection.DoesUserHaveWorkItems(userId, _
contentDb, workItemTypes)
public static bool DoesUserHaveWorkItems(
int userId,
SPContentDatabase contentDb,
params Guid[] workItemTypes
)
Parameters
userId
Type: System.Int32The ID of the user.
contentDb
Type: Microsoft.SharePoint.Administration.SPContentDatabaseThe content database of interest.
workItemTypes
Type: []The IDs of work item types of interest.
Return value
Type: System.Boolean
true if at least one work item of any of the specified work item types exists; otherwise, false.