In this article we will provide step-by-step instructions for how to call your JavaScript function using a command button. We are using the RibbonWorkbench editor to create a command button. You can download the RibbonWorkbench tool from here and import it your CRM organization by navigating Settings->Solutions->Import.
Let's first add our demo JavaScript function, use the following procedure.
Click on the Ok button and Save and Publish your web resource.
Let's say we want to add a custom command button on the account form, so let's add an account entity to our solution, use the following procedure to add an account entity to your solution: