Hi all
I have a button from which I want to trigger custom workflow. I know How to trigger custom workflow with the help of workflow? but I want to know the best way?
Thank You
*This post is locked for comments
Hi
use process.js
processjs.codeplex.com
community.dynamics.com/.../143712
Hi Abdul,
1. The recommended way would be to create a custom action and trigger it using JavaScript as recommended by Nadeeja.
2. You can also use 3rd party libraries, such as 'Process.js', as suggested by Nithya. But you will have a dependency on a 3rd party library, if you choose this method. And since, 'Process.js' is relatively new, I would not suggest this.
3. Another easy way would be to create a dummy field and have it on your form, but hidden. Modify your workflow to be triggered on change of this field.
So, your JavaScript modifies this field -> the field change triggers the workflow.
4. There is a new feature in 'Ribbon Workbench' by Scott Durow, called 'Smart Buttons'. I have not worked much with them. But I believe they can be leveraged for your scenario.
Hi Abdul Wahab,
You can download the Process.js library from the link below which contains the method Process.CallWorkflow.
See: https://processjs.codeplex.com/
Try the code below.
Process.callWorkflow("4AB26754-3F2F-4B1D-9EC7-F8932331567A", Xrm.Page.data.entity.getId(), function () { alert("Workflow executed successfully"); }, function () { alert("Error executing workflow"); });
Hope this helps.
You can create a custom action and call it using JavaScript. Inside custom action you can call the workflow.
debajmecrm.com/.../invoke-your-custom-action-from-dynamics-crm-web-apidynamics-crm-2016
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Aric Levin - MVP 2 Moderator
MA-04060624-0 1