Category Archives: Custom Workflow Activities
Few years ago, I started a project in Codeplex called “Dynamics CRM Custom Emails“, which allows you to send emails from a Microsoft Dynamics 365 / CRM process (e.g. workflow, action) based on an Email Template. Additionally, these emails can contain dynamic values for any entity (out-of-the-box or custom) and any type of attribute (e.g. lookup, option set, currency, etc).
Apart from just migrating the project from one place to the other, I have also updated it to the latest Dynamics 365 version.
There are some open issues in Codeplex that I would like to review, so I will try to do it before Codeplex closes and reflect them in the new Github project. I would like to thank you those guys who have collaborated and provide their feedback.
For those who has never seen this project, I would like to show you a quick example with some screenshots.
Let’s say we had the following Email Template:
We could then produce an email like this:
These would be done by a Dynamics workflow like this one:
This workflow will use the custom workflow activity provided by this solution. You can then specify the corresponding context parameters:
You will find more documentation in the Github project site:
This week we were trying to install Visual Studio 2017 (15.3.2) but we were getting the following error:
Package ‘Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2’ failed to install
Other Visual Studio components depend on this package:
- .NET desktop development
- .NET desktop development tools
- Windows Workflow Foundation
Since the Windows Workflow Foundation module couldn’t be installed, I couldn’t open workflow libraries to develop Custom Workflow Activities for Dynamics 365.
The solution was as simple as updating the System Variable __PSLockDownPolicy value to 1:
This is related to the PowerShell Constrained Language Mode, see the following article for more details:
Basically the Visual Studio installer was trying to run a command that was not allowed based on the PowerShell Constrained Language policy.
***Thanks to my colleague Emir for his help 😉
Looking at forums, there were other suggestions like stopping the anti-virus or run the following command:
Unblock-File -path “C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2\RegisterJustInTimeDebugger.ps1”
The following discussions were talking about the same: