Workflow Error Sending Email: “Execution Of User Code In The dotNET Framework Is Disabled”

Microsoft Dynamics GPThis has come up twice fairly recently. In the first case it was following an upgrade to Microsoft Dynamics GP 2016 and workflow was being introduced for the first time, and in the second it was when a client had created a new test system:

Execution Of User Code In The dotNET Framework Is Disabled

Microsoft Dynamics GP

[Microsoft][SQL Server Native Client 11.0][SQL Server]Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option.

“clr” is the SQL Server common language runtime which provides the execution environment for all .NET Framework code in SQL Server. .NET code execution of code in SQL Server stored procedures is how Workflow sends the emails. According to the Microsoft Developer Network, clr is off by default which I find somewhat surprising as I have implemented Microsoft Dynamics GP Workflow 2.0 a number of times now without encountering this problem.

You can check the status of clr by running the following command:

	name = 'clr enabled'

To enable clr, execute the following command:

sp_configure 'show advanced options', 1;
sp_configure 'clr enabled', 1;

Once clr has been enabled, Workflow 2.0 will be able to send emails without further problem.

Can ISC Software Solutions help?

ISC Software Solutions are UK and Ireland based experts on Microsoft Dynamics GP. If you'd like to speak to someone about support, consultancy, upgrades, implementation, development, GP Elementz add-ons or portals, or anything else Dynamics GP related, you can use the form below.
Your Name (required):
Your Email (required):
Enquiry message:

What should we write about next?

Your Name (required) -
Your Email (required) -

1 thought on “Workflow Error Sending Email: “Execution Of User Code In The dotNET Framework Is Disabled”

Leave a Reply

Your email address will not be published. Required fields are marked *