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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to trigger Workflow in JavaScript from Ribbon Button

(0) ShareShare
ReportReport
Posted on by 15

Hello Community,

I would like to ask how I am able to trigger my workflow when I click on my Ribbon Button in the record view list?

My requirement:

The customer wants me to implement the feature that, If the user selects at least 2 forecast records in the record view list, then the Ribbon Button called "OK" appears in the ribbon.
If the user clicks the OK Button, a workflow will be triggered which then changes the "Ok"-Column value in the view from "No" to "Yes".

What I have done so far:

- I created the Ribbon Button in the RibbonWorkbench.

- I associated the Command Rule with the needed JS scripts and added it to the OK Button.

- I added Enable Rule to the OK Button

- I created the Workflow

It looks like this:

The Workflow:

pastedimage1606315099893v1.png

The JavaScript function (As you can see here I provided a hardcoded GUID of Workflow, but I just copied this GUID from a similar function above.)


My question here specifically: If I copy the GUID of the Worfkflow above, which is "210B7CF2-EEB6-4342-AA15-DDC2648BECE3", will it correctly run or do I miss any steps in here overall?


pastedimage1606315131823v2.png

The Ribbon Button:
pastedimage1606315307495v3.png


Thank you !

I have the same question (0)
  • Verified answer
    Madalina Toma Profile Picture
    Microsoft Employee on at

    Hi Albert,

    Thank you for posting this question.

    We have an action performing an ExecuteWorkflow request which will help in this case:

    cloudblogs.microsoft.com/.../

    My recommendation is instead of using CallWorkflow, give the ExecuteWorkflow a try based on the documentation above.

    Madalina

  • Albert Schuman Profile Picture
    15 on at

    Hi Madalina,

    I followed the documentation and adapted your suggestion to my use case. This worked for me, thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 131 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 88

#3
Chris1968 Profile Picture

Chris1968 20

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans