web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Ribbon Workbench Button trigger workflow

(0) ShareShare
ReportReport
Posted on by 30

Hi Everyone,

I have a requirement that will create a record from a custom ribbon button.

I have created the custom workflow activity that will trigger on the click of the button.

How to call the workflow from the custom ribbon button(via ribbon workbench) and open the created record?

Thank you in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Take a look at the following link. It should help you out:

    ribbonworkbench.uservoice.com/.../132235-create-a-workflow-short-cut-ribbon-button-no-code

    You can also use Smart Buttons with Ribbon Workbench, which will allow you to achieve the same results:

    community.dynamics.com/.../smart-buttons-in-the-ribbon-workbench

    Hope this helps.

  • Joelon Profile Picture
    30 on at

    Hi Aric,

    Thank you for your response.

    Is it possible to bypass the workflow confirmation dialog? Or should I go to use an Action instead of workflow?

  • HarryZang Profile Picture
    240 on at

    If you just want to use a ribbon to create a new record, I think custom action may be a better choice.

    Inside the ribbon JavaScript, you can use code to call the custom action. The technical details can be found in the following link.

    https://community.dynamics.com/crm/b/microsoftdynamicscrmandstuff/archive/2016/01/13/web-api-executing-custom-action-via-javascript

                   or

    you can use add the create record function inside the ribbon JavaScript by using client side web-api 

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi Joelon,

    Workflows will display the confirmation dialog. This is an out of the box feature.

    You can call a custom action, but for that, in Ribbon Workbench, you will have to call a JavaScript function that will call an action.

    See the following article to configure Ribbon Workbench for that scenario.

    community.dynamics.com/.../creating-a-ribbon-button-using-ribbon-workbench-to-call-a-javascript-action

    For executing the action you can use either webapi or process.js

    Hope this helps.

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    You can call workflow from ribbon button using javascript. Create a javascript method that will trigger workflow. Call this method on click of button from ribbon workbench.

    Below links may help you:

    1. stackoverflow.com/.../start-workflow-with-javascript-in-dynamics-crm-2016

    2. thabisomotloung.wordpress.com/.../execute-a-workflow-using-javascript

    Hope this helps:)

  • Joelon Profile Picture
    30 on at

    Hi Aric,

    I tried this one but it did not call the function on my script.

    Also, I checked the Console of my browser via Inspect Element and I get this error when I click the button.

    830746.Capture.PNG

  • Joelon Profile Picture
    30 on at

    Sorry guys,

    looks like I need to call an action from the button click instead of calling the workflow.

    It just do nothing when I click the button.

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at

    Hi,

    You can debug js in browser. Please check this link for more information.

    blogs.msdn.microsoft.com/.../debugging-custom-javascript-code-in-crm-using-browser-developer-tools

  • Joelon Profile Picture
    30 on at

    Hi Everyone,

    Can you help me on this error?12022.Capture.PNG

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans