User-defined workflows have been disabled by the SharePoint Administrator. User-defined workflows will be unable to run.
Description
In this article you will see how to resolve the error "User-Defined workflows have been disabled by the SharePoint Administrator. User Defined workflows will be unable to run."
Error
When I was trying to create a simple workflow using the SharePoint Designer, I was getting the following error:
Reason
This is because SharePoint Administrators have disabled the SharePoint Designer workflows so that users will not be able to create custom SharePoint Designer workflows.
How to resolve:
Through Central Administration
- Go to Central Administration.
- Click on Application Management, and then click on Manage Web Applications.
- Select the Web Application for which the SharePoint Designer workflows must be enabled.
- In the ribbon interface, click on the General Settings drop down.
- Click on Workflow.
- Select yes under the "Enable user-defined workflows for all sites on this web application?" option.
Programmatically Enable SharePoint Designer workflows
namespace Console
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
class Program
{
static void Main(string[] args)
{
SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://serverName/"));
//// Disabling the SharePoint Designer workflows for the web application
webApp.UserDefinedWorkflowsEnabled = false;
//// Update the Changes
webApp.Update();
}
}
}
Reference: http://www.c-sharpcorner.com/uploadfile/anavijai/sharepoint-workflow-settings-for-sharepoint-2010-web-application/
Summary
Thus in this article you have seen how to resolve the error "User-Defined workflows have been disabled by the SharePoint Administrator. User Defined workflows will be unable to run." Or how to enable or disable the SharePoint Designer workflows.