SP.Workflow.WorkflowTemplateCollection.getByName Method (sp.js)
Returns the workflow template matching the name provided.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.Workflow.WorkflowTemplateCollection.getByName(name)
Parameters
name
Type: StringThe name of the workflow template to retrieve.
Return value
Type: SP.Workflow.WorkflowTemplate
Remarks
It must return the SP.Workflow.WorkflowTemplate object (sp.js) with name property equal to the name parameter, or null if no such WorkflowTemplate exists in the collection. All WorkflowTemplate objects in the collection must have a unique value for their name property. It must not be null.