Monday, September 12, 2011

Enable or Disable XAML Workflow in CRM 2011


You can use Windows PowerShell to enable or disable XAML workflows, as described here. Alternatively, you can use the Deployment Web service. For more information, see Introduction to the Deployment Web Service to set the AllowDeclarativeWorkflows property.

To enable XAML workflows

  1. Open a Windows PowerShell command window.
  2. Add the Microsoft Dynamics CRM PowerShell snap-in:
    Windows PowerShell
    Add-PSSnapin Microsoft.Crm.PowerShell
  3. Retrieve the current setting:
    Windows PowerShell
    $setting = get-crmsetting customcodesettings
  4. Modify the current setting:
    Windows PowerShell
    $setting.AllowDeclarativeWorkflows="True"
    Windows PowerShell
    set-crmsetting $setting
  5. Verify the setting:
    Windows PowerShell
    get-crmsetting customcodesettings

To disable XAML workflows

  1. Open a Windows PowerShell command window.
  2. Add the Microsoft Dynamics CRM PowerShell snap-in:
    Windows PowerShell
    Add-PSSnapin Microsoft.Crm.PowerShell
  3. Retrieve the current setting:
    NPL
    $setting = get-crmsetting customcodesettings
  4. Modify the current setting:
    Windows PowerShell
    $setting.AllowDeclarativeWorkflows=0
    Windows PowerShell
    set-crmsetting $setting
  5. Verify the setting:
  6. Windows PowerShell
    get-crmsetting customcodesettings

No comments:

Post a Comment