CRM 2011 Workflow Xaml drag and drop issue

Posted on Posted in Microsoft, MS CRM 2011, MS Dynamics, MS Dynamics CRM

Using Visual Studio 2012 and adding a new Activity (xaml – workflow) should give a design view and then drag and drop tools to use all the available tools and Workflow activity however drag and drop would not work and whenever you try to drag an item it will not do anything.

This is what I had to do…
I am using Windows Server 2012 for my Microsoft Dynamics CRM 2011 and then using Visual Studio 2012 on my Windows 8 machine.

Go to file> new project> Templates>Visual C#>Workflow>Activity Library

WF Screen 1

This created a new project with Activity1.xaml file which has a design view and we can use it to drag and drop things inlucing any activity classes/functionality we have.

However it did not work for me at start….I was unable to drag any item to Workflow design view

WF Screen 2

After spedning sometime I figured out that XAML Workflows was disabled on my CRM sevrer i.e. Winbdows Server 2012
I had to run couple of commands below to enable it

WF Screen 3

First you need to open Windows PowerShell

1) Add-PSSnapin Microsoft.Crm.PowerShell
2) $setting = get-crmsetting customcodesettings
3) $setting.AllowDeclarativeWorkflows=”True”
4) set-crmsetting $setting
Just to veryfiy run command below

get-crmsetting customcodesettings

After that you should be able to drag and drop items on design window

workflow xaml design