Workflow E-mailing in Microsoft Dynamics GP
Hello Dynamics GP Community!
We wanted to publish an article to cover the topic of e-mailing from the Workflow module in Dynamics GP to clear up some possible confusion and act as a resource to gather troubleshooting resources around this. As any new information is uncovered we will make sure it is added to this article.
First, we should touch on how Workflow email works in Dynamics GP. Within the Workflow Setup window (Tools > Setup > System > Workflow Setup ) you can specify both an SMTP server and the Web Services machine location you would like to use. By filling out this window you enable the “Send Messages” option when you’re setting up your actual workflow steps in Workflow Maintenance (Tools > Setup > Company > Workflow > Workflow Maintenance).
Within Workflow Setup you will see options to Test E-mail and Test E-mail Actions to verify the SMTP and Web Services information you’re provided, respectively. Keep in mind that the Test E-mail button only tests the SMTP information. It will not verify that Modern Authentication email is working.
At this point most customers will be using Modern Authentication for signing into e-mail in Dynamics GP. This also applies to Workflow e-mail. When you perform an action in workflow that will generate an e-mail GP will either prompt you to sign into the Modern Authentication window or use the previously authenticated connection to MSGraph to send the email. This e-mail will appear to be sent from the account that was authenticated. The exception to this is if you are emailing from within the Dynamics GP Web Client, which will always send as the user who was specified when Modern Authentication was initially set up there.
This will apply to any Workflow e-mail that is sent from within the Dynamics GP client. That leaves two situations where e-mail will work differently:
- If you have reminder e-mails setup as part of your Workflow configuration it will rely on a SQL Server Agent Job to test for such a condition and then send an e-mail if necessary
- If you have e-mail actions enabled and a user approves/rejects/delegates a workflow task from the links in an assignment e-mail
Both situations occur outside of the Dynamics GP client, so they cannot accommodate the Modern Authentication sign-in window. This means they will fall back to the SMTP connection information held in Workflow Setup to send these e-mails.
In terms of SMTP troubleshooting, we’ve already published an in-depth troubleshooting guide, which you can find at the following link:
Workflow Notification Email Troubleshooting (dynamics.com)
Workflow Notification Email Troubleshooting (dynamics.com)
Workflow E-mail Troubleshooting
- If you receive any errors when performing a Workflow action in Dynamics GP that mention .NET Framework it likely means an issue with one of the assemblies that GP uses to query Active Directory and send e-mail. For example:
The most common solution for this type of error is to run the following query against the DYNAMICS database in SQL Server Management Studio to redeploy these assemblies:
exec wfDeployClrAssemblies
- There have been many enhancements and fixes released specifically around Modern Authentication and Workflow e-mail since it was first introduced in the Dynamics GP Fall 2020 (18.3) release. It is highly recommended to upgrade to the latest release of GP when encountering any issues. You can refer to the fix list included with any GP patch to see what has been addressed.
- Another recommended troubleshooting step is to verify that Modern Authentication e-mail itself is working in your environment. A simple way to accomplish that is to create and send a simple report option in GP:
- Log into Dynamics GP as ‘sa’ or another user with appropriate permissions
- Navigate to Reports > System > Users to open the User Reports window
- Select the Company Access report from the Reports: drop down, then click the New button
- Provide a name for this new report option, then click the E-mail Options button.
- This will prompt you to save this option, so click Save and you should be presented with the “Sign in to your account” window
- Provide appropriate credentials and the Email Options window will open. Specify a recipient in the To: field, then click OK to close the window
- Back in User Report Options pull up the option you created, then click the Email button to try sending it. Is that report received?
General Troubleshooting Questions and Considerations
- Does the issue impact multiple companies? Workflow types? Specific steps or approvers/recipients? Knowing where exactly you can replicate the problem will help define the boundaries of the issue and can point to what the solution is.
- How are you performing the process that should be generating an e-mail? Are you doing something like submitting/approving within the Dynamics GP client or are you using a Workflow Action link (e.g. Approve, Reject or Delegate) from an assignment email?
- What account is running your SQL Server instance’s service? When you perform a Workflow task in Dynamics GP the CLR assemblies will use that service account to communicate with Active Directory to resolve the approver and retrieve their e-mail address. This means the service account needs to be a domain account with permissions to the domain/OU where the approvers exist.
- If emails are not sent to the appropriate approver check how your workflow step is configured. If you have it set up to use the Hierarchy option it will use the manager/skip-level manager as defined in Active Directory, so you will want to make sure that it is configured correctly. Also, any approver will need an e-mail address setup on their user object in AD.
As we get reports of other problems/solutions for Workflow e-mailing we will be sure to compile them in this article.
*This post is locked for comments