Starting a dialog/workflow from a ribbon button

Now that we know how to hide a ribbon button and how to add our custom buttons to the forms, the next step is to make these buttons do something a little more intelligent than just bring up a pop-up message.

Getting ready

For the purpose of this recipe, we can either continue on the customizations started in the Adding a new ribbon button recipe at the beginning of this chapter, or re-create the button and the action as described there.

How to do it...

In order to kick off a workflow using a ribbon button, perform the following steps:

  1. Add your new form button as described in the first recipe of this chapter.
  2. Create your custom workflow as part of the same solution.

    Note

    We will require the workflow ID in ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.