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 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

I have the same question (0)
  • Suggested answer
    miguelbeja Profile Picture
    on at

    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.

  • Suggested answer
    miguelbeja Profile Picture
    on at

    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

  • Arafat Profile Picture
    155 on at

    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

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 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 42

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans