CRM 2011 Custom Button on Custom Entity to trigger Workflow through JavaScript
I will provide detailed step on what I did to do this. The objective of my example is to have a custom button 'Create Opportunity' on my custom entity that triggers a workflow to create an Opportunity. This way the users don't have to click 'Run Workflow' and choose which workflow they want to run. You can also alter the JavaScript to do other stuff as well. There are three places where we should put the button mainly: 1. Custom Entity Form 2. Homepage Grid 3. Sub Grid THE STEPS: 1. In order to inspect the correct sequence number of where the button will be placed on each section, you can first run the tool provided from the sdk \sdk\samplecode\cs\client\ribbon\exportribbonxml . Just modify the exportribbonxml.cs to only generate the entity you are interested in: Run the tool program, specify your server connection and it should give you the XML in the output folder with the name Ribbon.xml . Open the xml, search for the sections and write down th...