Helper.GetListGuid Method
Retrieves a list GUID from a specified list name or list identifier (ID).
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function GetListGuid ( _
context As WorkflowContext, _
listNameOrId As String _
) As Guid
'Usage
Dim context As WorkflowContext
Dim listNameOrId As String
Dim returnValue As Guid
returnValue = Helper.GetListGuid(context, _
listNameOrId)
public static Guid GetListGuid(
WorkflowContext context,
string listNameOrId
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextWorkflowContext object that contains properties that are associated with the active workflow instance.
listNameOrId
Type: System.StringA string that represents either the GUID of the SharePoint Foundation list ID or the list name.
Return Value
Type: System.Guid
The list GUID.
Remarks
If a valid WorkflowContext object is passed to the GetListGuid method, it validates the list ID that you are retrieving, to determine if it is in the Web property of the WorkflowContext object.