Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

run workflow from button (RibbonWorkbench) launchOnDemandWorkflowForm

(0) ShareShare
ReportReport
Posted on by 452

I have created a workflow that I can successfully run on a record.

I simply want to put the workflow on a button.

I have downloaded Ribbon Workbench and using with Crm 2015 online.

I publish the change to the ribbon but when I click on the button

Sounds like such a simple task but I cannot get it to work.

Please Help :)

Thanks in advance

RibbonWorkbenchParameters.jpg

RibbonWorkBenchError.jpg

Here is my RibbonDiffXml

<RibbonDiffXml>
<CustomActions>
<CustomAction Id="dvt.salesorder.Button1.Button.CustomAction" Location="Mscrm.Form.salesorder.MainTab.Actions.Controls._children" Sequence="12">
<CommandUIDefinition>
<Button Alt="$LocLabels:dvt.salesorder.Button1.Button.Alt" Command="dvt.salesorderRunWorkflow1.Command" Description="Copy Sales Order" Id="dvt.salesorder.Button1.Button" LabelText="$LocLabels:dvt.salesorder.Button1.Button.LabelText" Sequence="12" TemplateAlias="o1" ToolTipTitle="$LocLabels:dvt.salesorder.Button1.Button.ToolTipTitle" ToolTipDescription="$LocLabels:dvt.salesorder.Button1.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="dvt.salesorderRunWorkflow1.Command">
<EnableRules />
<DisplayRules />
<Actions>
<JavaScriptFunction FunctionName="Mscrm.CommandBarActions.launchOnDemandWorkflowForm" Library="/_static/_common/scripts/CommandBarActions.js">
<CrmParameter Value="PrimaryEntityTypeCode" />
<StringParameter Value="7bAEC2E56B-32F0-48CD-B909-2A22CD88B716" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels>
<LocLabel Id="dvt.salesorder.Button1.Button.Alt">
<Titles>
<Title description="Copy Sales Order" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="dvt.salesorder.Button1.Button.LabelText">
<Titles>
<Title description="Copy Sales Order" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="dvt.salesorder.Button1.Button.ToolTipDescription">
<Titles>
<Title description="Copy Sales Order" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="dvt.salesorder.Button1.Button.ToolTipTitle">
<Titles>
<Title description="Copy Sales Order" languagecode="1033" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>

*This post is locked for comments

  • RE: run workflow from button (RibbonWorkbench) launchOnDemandWorkflowForm

    omg so awesome!!  I never even thought of that

  • RE: run workflow from button (RibbonWorkbench) launchOnDemandWorkflowForm

    What I've done that I find easier is I have a yes/no field hidden that triggers the workflow. Then all my button does it set that field to yes... not as fancy but works.

    Andrii is right. You don't need the "7b"

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: run workflow from button (RibbonWorkbench) launchOnDemandWorkflowForm

    Hello,

    You have 2 symbols more in workflow id you pass. Try to use

    AEC2E56B-32F0-48CD-B909-2A22CD88B716

    instead of

    7bAEC2E56B-32F0-48CD-B909-2A22CD88B716

    as a workflow id.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans