Export (0) Print
Expand All

Register and use a custom workflow activity assembly

Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online

After you compile your custom workflow activity to create an assembly, you have to register the assembly with Microsoft Dynamics CRM. Your custom activity will then appear in the process form of Microsoft Dynamics CRM Online or Microsoft Dynamics CRM 2013 depending on which deployment you registered the custom workflow activity with.

Enable or disable custom code

You can use Windows PowerShell to enable or disable custom workflow activities and plug-in execution for an on-premises server as described here. Alternatively, you can use the Deployment web service. For more information, see Deployment entities and deployment configuration settings to learn how to set the CustomCodeSettings.AllowExternalCode property.

  1. Open a Windows PowerShell command window.

  2. Add the Microsoft Dynamics CRM PowerShell snap-in:

    Add-PSSnapin Microsoft.Crm.PowerShell
    
  3. Retrieve the current setting:

    $setting = get-crmsetting customcodesettings
    
  4. Modify the current setting:

    $setting.AllowExternalCode="True"
    
    set-crmsetting $setting
    
  5. Verify the setting:

    get-crmsetting customcodesettings
    

  1. Open a Windows PowerShell command window.

  2. Add the Microsoft Dynamics CRM PowerShell snap-in:

    Add-PSSnapin Microsoft.Crm.PowerShell
    
  3. Retrieve the current setting:

    $setting = get-crmsetting customcodesettings
    
  4. Modify the current setting:

    $setting.AllowExternalCode=0
    
    set-crmsetting $setting
    
  5. Verify the setting:

    get-crmsetting customcodesettings
    

Register a custom workflow activity

Custom workflow activity assemblies are registered using the Plug-in Registration tool. The tool provides a graphical user interface and supports registering assemblies that contain plug-ins or custom workflow activities. When registering an assembly that contains custom workflow activities with Microsoft Dynamics CRM Online, you must register the assembly in the sandbox (partial trust).

For more information about how to register and deploy a custom activity assembly by using the tool, see Specify the Name and Group Name for a Custom Workflow Activity.

noteNote
You can find the Plug-in Registration tool’s executable file in the SDK\Tools\PluginRegistration folder of the SDK. Download the Microsoft Dynamics CRM SDK package. The tool can be added to the Microsoft Visual Studio Tools menu as an external tool to speed up the development process.

Use a custom workflow activity in a process

After you have registered your custom workflow activity assembly, you can use it in the process designer in Microsoft Dynamics CRM.

To use your custom workflow activity in a process:

  1. Sign in to Microsoft Dynamics CRM.

  2. Click or tap Settings > Processes.

  3. Create or open an existing process.

  4. In the process designer, click or tap Add Step. Your custom workflow activity name will appear in the drop-down list.



See Also

Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft