There are a lot of quick ways of doing things in Microsoft Dynamics 365 but developers struggle in finding how. Today I am going to explain how to call a workflow on a custom ribbon button.
Let’s say you have a situation, where you want to perform some operation on custom ribbon button on “click event”. Let us take an example. I have a button on OPPORTUNITY form called ‘ConfirmRequest’.On the click event of this button I have to generate an ORDER and also want to send an email. The best way to achieve this is by creating a workflow. Butthe issue is, how to call workflow on the button click.
There are many solutions posted on the web, that involve using JavaScript, web resources etc. however there is a much easier way that requires no coding.For this we use Ribbon Workbench. Contact us to find out the right plugin to download.
Here are the steps to follow:
- Create a workflow, for example – I created a workflow called Generate Order from Opportunity.
- Extract the GUID of this workflow with the help of advanced find. Here is how you do it:
- Open advanced find window
- Look for processes and search for your workflow name
- Export to Excel and extract the GUID of the proceed from the column A called (Do Not Modify) Process.
- Load the new solution into the Ribbon Workbench with OPPORTUNITY entity.
- Expand the commands, “Solution Elements” tab.
- Right-click on the Command of the custom button that you want to use. Example ‘CCSDP .opportunity.Generate Order.Command’ and select ‘Edit Actions’.
- Add a JavaScript Command and set the following properties:
- Click on OK. And publish it.The workflow will start getting called from the click of the custom button.
- Congratulations!!! Now you know how to call workflow from a Custom Ribbon button on Microsoft Dynamics 365.
To Know More visit
http://www.solzit.com/dynamics-crm-development-tips-and-tricks-calling-a-workflow-from-ribbon-button/ or talk to our experts http://www.solzit.com/
No comments:
Post a Comment