Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Ribbon button not triggering on demand workflow

Posted on by Microsoft Employee

I an using Dynamics 365 online, and have created an On demand workflow(Raise CR):

8836.Workflow.PNG

I am trying to trigger this workflow from Ribbon button(Raise CR) added by me on Main form using Ribbon Workbench. 

When I manually run the workflow it works fine but when I click on the ribbon button nothing happens

below is the XML of ribbon:

<?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
  <CustomActions>
    <CustomAction Id="infinity.new_baprequest.Button2.RaiseCR.CustomAction" Location="Mscrm.Form.new_baprequest.MainTab.Save.Controls._children" Sequence="45">
      <CommandUIDefinition>
        <Button Command="infinity.new_baprequest.Command0.CRCommand" Id="infinity.new_baprequest.Button2.RaiseCR" Image32by32="$webresource:Marketing/_images/MA/CopyAsCampaign_16.png" Image16by16="$webresource:Marketing/_images/MA/CopyAsCampaign_16.png" LabelText="$LocLabels:infinity.new_baprequest.Button2.RaiseCR.LabelText" Sequence="45" TemplateAlias="o2" ToolTipTitle="$LocLabels:infinity.new_baprequest.Button2.RaiseCR.ToolTipTitle" ToolTipDescription="$LocLabels:infinity.new_baprequest.Button2.RaiseCR.ToolTipDescription" />
      </CommandUIDefinition>
    </CustomAction>
    <HideCustomAction HideActionId="infinity.Mscrm.HomepageGrid.new_baprequest.Activate.Hide" Location="Mscrm.HomepageGrid.new_baprequest.Activate" />
    <HideCustomAction HideActionId="infinity.Mscrm.HomepageGrid.new_baprequest.Deactivate.Hide" Location="Mscrm.HomepageGrid.new_baprequest.Deactivate" />
    <HideCustomAction HideActionId="infinity.Mscrm.HomepageGrid.new_baprequest.Edit.Hide" Location="Mscrm.HomepageGrid.new_baprequest.Edit" />
    <HideCustomAction HideActionId="infinity.Mscrm.HomepageGrid.new_baprequest.NewRecord.Hide" Location="Mscrm.HomepageGrid.new_baprequest.NewRecord" />
    <HideCustomAction HideActionId="infinity.Mscrm.HomepageGrid.new_baprequest.NewRecordForBPFEntity.Hide" Location="Mscrm.HomepageGrid.new_baprequest.NewRecordForBPFEntity" />
  </CustomActions>
  <Templates>
    <RibbonTemplates Id="Mscrm.Templates" />
  </Templates>
  <CommandDefinitions>
    <CommandDefinition Id="infinity.new_baprequest.Command0.CRCommand">
      <EnableRules />
      <DisplayRules />
      <Actions>
        <JavaScriptFunction FunctionName="Mscrm.CommandBarActions.launchOnDemandWorkflowForm" Library="/_static/_common/scripts/CommandBarActions.js">
          <CrmParameter Value="PrimaryEntityTypeCode" />
          <StringParameter Value="0D69A285-FD02-46A8-9699-1265931D2C89" />
        </JavaScriptFunction>
      </Actions>
    </CommandDefinition>
  </CommandDefinitions>
  <RuleDefinitions>
    <TabDisplayRules />
    <DisplayRules />
    <EnableRules />
  </RuleDefinitions>
  <LocLabels>
    <LocLabel Id="infinity.new_baprequest.Button2.RaiseCR.LabelText">
      <Titles>
        <Title description="Raise CR" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="infinity.new_baprequest.Button2.RaiseCR.ToolTipTitle">
      <Titles>
        <Title description="CR" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="infinity.new_baprequest.Button2.RaiseCR.ToolTipDescription">
      <Titles>
        <Title description="Raise CR" languagecode="1033" />
      </Titles>
    </LocLabel>
  </LocLabels>
</RibbonDiffXml>

 

*This post is locked for comments

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Ribbon button not triggering on demand workflow

    Hi,

    Didn't look  at your code before, It uses internal function which is unsupported and may not be available anymore Mscrm.CommandBarActions.launchOnDemandWorkflowForm

    You can use the smart button solution (along with RWB solution) which has a predefined button to call the workflow without any code. Refer below links-

    develop1.net/.../Smart-Buttons-in-the-Ribbon-Workbench

    www.develop1.net/.../Adding-Ribbon-Workbench-SmartButtons-to-the-Unified-Client

    ribbonworkbench.uservoice.com/.../896958-smart-buttons

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Ribbon button not triggering on demand workflow

    I have changed scope to organization, still same issue

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Ribbon button not triggering on demand workflow

    Hi,

    The scope of the workflow is set to user, this means it will only work for the user who created it. Change this to organization and see if it helps.

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans