Stoetech


Sometimes it gets to the point that you are just sick of how many clicks it takes to fire off an on-demand workflow. Because of this, it sometimes makes sense to add a button to the ribbon of the form. This can save time while also making Dynamics look and feel more tailored to your company.

Task

We are going to add a button to the main Quote form, then associate a workflow with the button.

First, create an Unmanaged Solution and add the entity, Quote, to it. DO NOT add any of the forms/views or metadata, only the entity you need.

Next, open the Ribbon Workbench, and load the solution we just created.

Now that we have the entity, add a smart button to it. The type of button will be a workflow. We will simply add the workflow that we wanted to create a shortcut by copying and pasting its exact name. **You can shorten the name of the workflow for the button to display**.

Once the workflow is added, all that is left to do is to publish the solution and confirm it works correctly. Below you can see that the button has successfully been added to the form. Give it a quick test and you are good to go!

If you would like to continue learning how to use JavaScript, we have an educational blog with many more examples of code.