There are a lot of quick ways of doing things in Dynamics CRM but developers struggle with 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. But the issue is, how to call workflow on the button click.
There are many solutions posted on the web, that involve using learnacademy.org ruby javascript coding, 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.GenerateOrder.Command’ and select ‘Edit Actions’.
Add a JavaScript Command and set the following properties:
Function Name
Mscrm.FormAction.launchOnDemandWorkflowForm
Library
/_static/_forms/form.js
Parameters
1: Type = Crm Parameter,
Value = PrimaryEntityTypeCode
2: Type = String,
Value = Workflow ID which is extracted from advance find
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 Dynamics CRM.
Sonika Vishwakarma, Soluzione's CEO, boasts 18+ years in IT, from hands-on development to leading top-tier organizations. She is a Microsoft Certified Technology Specialist and an expert project manager, with a proven track record of delivering end-to-end software solutions across diverse domains. As a results-oriented leader, Sonika has set up offshore development centers, demonstrating exceptional organizational and communication skills, with a focus on building robust client relations.
Soluzione uses cookies on this website to ensure you have an excellent user experience. By continuing to use this website, you accept the use of cookies. For more information about the cookies used, click Read More.. ACCEPTRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
You must be logged in to post a comment.