For business management solutions email us or call 020 3004 4600

Errors occurring when using Microsoft Dynamics GP Workflow

For those of our valued clients using GP Workflow, we wanted to bring an issue to your attention which, whilst being an annoyance, is thankfully easily resolved.

What’s the Issue?

The Workflow feature in Microsoft Dynamics GP has relied on CLR assemblies stored in SQL Server since it was introduced in GP 2015.  These assemblies are used to make calls to Active Directory and drive the email notification functionality in Workflow.  I'm sure several of you will now have experienced an error like the following if you have been a Workflow user or someone who supports the module:

[Microsoft][SQL Server Native Client 11.0][SQL Server]A .NET Framework error occurred during execution of user-defined routine or aggregate 'GetAssignedUsers'. System.IO.FileLoadException: Could not load file or assembly 'System.DirectoryServices, Vers

We've recently become aware of a .NET Framework patch that is automatically being installed on several different OS versions that appears to be causing the above error to occur in Dynamics GP. 

How do we resolve it?

The recommended solution for this, or any similar .NET error encountered while submitting, approving, rejecting or otherwise acting on a Workflow task is to redeploy these CLR assemblies.  To accomplish this you simply need to:

1) Open SQL Server Management Studio and connect to your Dynamics GP instance

2) Make a backup of the DYNAMICS Database

3) Open a new query window for the System (e.g. DYNAMICS) database

4) Run the following to execute the necessary stored procedure:
exec wfDeployCLRAssemblies

You can do this while other users are in Dynamics GP, but if anyone is attempting to act on a Workflow task while this is running they may experience other issues. When this successfully executes the Results pane in SSMS will return several lines of text.  You can then test Workflow again and you should see better results.  

Need more help from Advantage Business Systems?

Whilst many of our customers’ IT Teams/Database Administrators will be more than capable of implementing this fix, we do appreciate that this is not the case for all, so feel free to log a call with our GP Support Team at support@advantage.co.uk and we will be happy to help!  Make sure you have an up-to-date backup of your DYNAMICS Database before logging the call.  This will need to be in place before we can assist.