Share via


SPWorkflowWorkflowRoleCreator.GetWorkflowRoleForPermission method (SPListItem, SPBasePermissions)

Gets a workflow role for the specified permissions on the specified list item.

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

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.AbstractReturnType)> _
Public Shared Function GetWorkflowRoleForPermission ( _
    item As SPListItem, _
    perm As SPBasePermissions _
) As WorkflowRole
'Usage
Dim item As SPListItem
Dim perm As SPBasePermissions
Dim returnValue As WorkflowRole

returnValue = SPWorkflowWorkflowRoleCreator.GetWorkflowRoleForPermission(item, _
    perm)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.AbstractReturnType)]
public static WorkflowRole GetWorkflowRoleForPermission(
    SPListItem item,
    SPBasePermissions perm
)

Parameters

Return value

Type: System.Workflow.Activities.WorkflowRole
The newly created workflow role for the specified permissions.

Remarks

This method returns a workflow role for the specified permissions on the specified list item.

See also

Reference

SPWorkflowWorkflowRoleCreator class

SPWorkflowWorkflowRoleCreator members

GetWorkflowRoleForPermission overload

Microsoft.SharePoint.Workflow namespace