SPWorkflowTemplateCollection.GetTemplateByName Method
Gets the workflow template based on its name.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function GetTemplateByName ( _
name As String, _
cultureInfo As CultureInfo _
) As SPWorkflowTemplate
'Usage
Dim instance As SPWorkflowTemplateCollection
Dim name As String
Dim cultureInfo As CultureInfo
Dim returnValue As SPWorkflowTemplate
returnValue = instance.GetTemplateByName(name, _
cultureInfo)
public SPWorkflowTemplate GetTemplateByName(
string name,
CultureInfo cultureInfo
)
Parameters
name
Type: System.StringThe name of the workflow template to return.
- cultureInfo
Type: System.Globalization.CultureInfo
Return Value
Type: Microsoft.SharePoint.Workflow.SPWorkflowTemplate
An SPWorkflowTemplate object that represents the workflow template.
Remarks
This method gets the workflow template with the name specified by the name parameter. If no such template exists, this method returns null .
See Also
Reference
SPWorkflowTemplateCollection Class
SPWorkflowTemplateCollection Members
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation