Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Calling Workflow from Ribbon Button

(0) ShareShare
ReportReport
Posted on by 155

Hello Experts

I know it is 100% possible to call on-demand workflow from hooking up JS scripts with buttons but as Ribbon Workbench provides a way to add CRM Parameters so I tried to do it without writing a code.

So what I did is; 

Added /_static/_common/scripts/CommandBarActions.js to Library Field
Added Mscrm.CommandBarActions.launchOnDemandWorkflowForm to Function Name field
Added CRM Parameter and choose PrimaryEntityTypeCode
Added another String Parameter and added my WorkFlow GUID

pastedimage1570175317268v1.png

Now, the QUESTION is:

Is the inclusion of that javascript and usage of those functions be considered "supported" customisation or is it not recommended by Microsoft? 

Looking forward to learn from you people.

Cheers

Arafat

  • Arafat Profile Picture
    155 on at
    RE: Calling Workflow from Ribbon Button

    Thank you Miguel for the pointer. 

    In my opinion, people who are trying to promote such techniques should avoid as it would lead to a different situation. 

    Cheers

    Arafat

  • Suggested answer
    miguelbeja Profile Picture
    on at
    RE: Calling Workflow from Ribbon Button

    Just searched on the documentation:

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/supported-extensions#ribbon-customization

    Ribbon customization

    Use of RibbonDiffXml to add, remove, or hide ribbon elements is supported. Reuse of ribbon commands defined by Dynamics 365 Customer Engagement (on-premises) is supported; however, we reserve the right to change or deprecate the available commands. Reuse of JavaScript functions defined within ribbon commands is not supported.

    So I would say it is not supported

  • Suggested answer
    miguelbeja Profile Picture
    on at
    RE: Calling Workflow from Ribbon Button

    Hello,

    It is not common to use internal libraries and functions to a new button when it might should be used on another button. The worst thing that can happen is that library being changed and the function and at the end your button won't work as expected anymore.

    It is much safer to use your own JS library, with your code to call the workflow and at the end you won't have much problems with updates in the future.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#2
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 53 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 32 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans