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 CRM (Archived)

Duplicated <CustomActions> and <CommandDefinitions> when adding a button with Ribbon Workbench

(1) ShareShare
ReportReport
Posted on by 30

Dynamics 365 (Version 1710 (9.1.0.2055))

Ribbon Workbench 2016 3.1.177.1

I added a button to a custom entity form (on a customer's sandbox instance) using Ribbon Workbench but when I published it there was an error saying "dc.cc_offerout.TestSendEmail.Command already exists". I thought I may have used that name already so changed the command name to dc.cc_offerout.TestSendEmailv2.Command. This gave me the same error when I published the solution. I reloaded the solution in RW and it showed duplicate commands:

dc.cc_offerout.TestSendEmail.Command

dc.cc_offerout.TestSendEmail.Command

dc.cc_offerout.TestSendEmail.Commandv2

dc.cc_offerout.TestSendEmail.Commandv2

I've looked at many articles on community.dynamics.com and other places but none of the suggestions worked, so I did an instance copy from the live environment to the sandbox to reset everything. I recreated the button and it appeared to work and the solution was deployed to live. Unfortunately, the command had duplicated once again. I've tried renaming the elements within the ribbon xml, but it still duplicated each one, so this is what we currently have:

RW-Solution-Elements.JPG

I have tried deleting the elements from within RW - no success

I have tried editing customizations.xml to:

<RibbonDiffXml>

</RibbonDiffXml>

I have tried editing it with empty child elements as instructed in this article (I know that's for CRM 2011 but it was worth a try).

<RibbonDiffXml>

<CustomActions />

<Templates>

<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>

</Templates>

<CommandDefinitions />

<RuleDefinitions>

<TabDisplayRules />

<DisplayRules />

<EnableRules />

</RuleDefinitions>

<LocLabels />

</RibbonDiffXml>

I'll post the current RibbonDiffXml in the following post.

I can't copy the live instance to sandbox again because it's already got the duplicate actions/commands. This is now causing a problem if we try to import this custom entity to live because the import fails due to duplicate action/command ids. How can I remove RibbonDiff elements?

*This post is locked for comments

I have the same question (0)
  • Gaz Powell Profile Picture
    30 on at

    Here is the current XML:

    <RibbonDiffXml>
    
           <CustomActions>
    
             <CustomAction Id="dc.cc_offerout.CombineMarketingLists.Button.CustomAction" Location="Mscrm.Form.cc_offerout.MainTab.ModernClient.Controls._children" Sequence="8">
    
               <CommandUIDefinition>
    
                 <Button Alt="$LocLabels:dc.cc_offerout.CombineMarketingLists.Button.Alt" Command="dc.cc_offerout.CombineMarketingLists.Command" Id="dc.cc_offerout.CombineMarketingLists.Button" LabelText="$LocLabels:dc.cc_offerout.CombineMarketingLists.Button.LabelText" Sequence="8" ToolTipTitle="$LocLabels:dc.cc_offerout.CombineMarketingLists.Button.ToolTipTitle" />
    
               </CommandUIDefinition>
    
             </CustomAction>
    
             <CustomAction Id="dc.cc_offerout.MarketingEmail.Button.CustomAction" Location="Mscrm.Form.cc_offerout.MainTab.ModernClient.Controls._children" Sequence="16">
    
               <CommandUIDefinition>
    
                 <Button Alt="$LocLabels:dc.cc_offerout.MarketingEmail.Button.Alt" Command="dc.cc_offerout.SendEmail.Command" Id="dc.cc_offerout.MarketingEmail.Button" LabelText="$LocLabels:dc.cc_offerout.MarketingEmail.Button.LabelText" Sequence="16" ToolTipTitle="$LocLabels:dc.cc_offerout.MarketingEmail.Button.ToolTipTitle" />
    
               </CommandUIDefinition>
    
             </CustomAction>
    
             <CustomAction Id="dc.cc_offerout.TestSendEmail.Button.CustomAction" Location="Mscrm.Form.cc_offerout.Developer.Design.Controls._children" Sequence="15">
    
               <CommandUIDefinition>
    
                 <Button Command="dc.cc_offerout.TestSendEmail.Command" Id="dc.cc_offerout.TestSendEmail.Button" LabelText="$LocLabels:dc.cc_offerout.TestSendEmail.Button.LabelText" Sequence="15" TemplateAlias="isv" ToolTipTitle="$LocLabels:dc.cc_offerout.TestSendEmail.Button.ToolTipTitle" ToolTipDescription="$LocLabels:dc.cc_offerout.TestSendEmail.Button.ToolTipDescription" />
    
               </CommandUIDefinition>
    
             </CustomAction>
    
             <CustomAction Id="dc.cc_offerout.TestSendEmail.Button.CustomAction" Location="Mscrm.Form.cc_offerout.Developer.Design.Controls._children" Sequence="15">
    
               <CommandUIDefinition>
    
                 <Button Command="dc.cc_offerout.TestSendEmail_b.Command" Id="dc.cc_offerout.TestSendEmail.Button" LabelText="$LocLabels:dc.cc_offerout.TestSendEmail.Button.LabelText" Sequence="15" TemplateAlias="isv" ToolTipTitle="$LocLabels:dc.cc_offerout.TestSendEmail.Button.ToolTipTitle" ToolTipDescription="$LocLabels:dc.cc_offerout.TestSendEmail.Button.ToolTipDescription" />
    
               </CommandUIDefinition>
    
             </CustomAction>
    
           </CustomActions>
    
           <Templates>
    
             <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
    
           </Templates>
    
           <CommandDefinitions>
    
             <CommandDefinition Id="dc.cc_offerout.CombineMarketingLists.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="execute" Library="$webresource:dc_OfferOutCombineMarketingLists" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.SendEmail.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOutEmails.SendMarketingEmail" Library="$webresource:dc_/js/OfferOut_SendEmail.js" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail_a.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail_a.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js" />
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail_b.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js">
    
                   <CrmParameter Value="PrimaryControl" />
    
                 </JavaScriptFunction>
    
               </Actions>
    
             </CommandDefinition>
    
             <CommandDefinition Id="dc.cc_offerout.TestSendEmail_b.Command">
    
               <EnableRules />
    
               <DisplayRules />
    
               <Actions>
    
                 <JavaScriptFunction FunctionName="OfferOut.MarketingEmailButton.sendEmail" Library="$webresource:dc_/js/OfferOut_SendMarketingEmailButton.js">
    
                   <CrmParameter Value="PrimaryControl" />
    
                 </JavaScriptFunction>
    
               </Actions>
    
             </CommandDefinition>
    
           </CommandDefinitions>
    
           <RuleDefinitions>
    
             <TabDisplayRules />
    
             <DisplayRules />
    
             <EnableRules />
    
           </RuleDefinitions>
    
           <LocLabels>
    
             <LocLabel Id="dc.cc_offerout.CombineMarketingLists.Button.Alt">
    
               <Titles>
    
                 <Title description="Combine Marketing Lists" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.CombineMarketingLists.Button.LabelText">
    
               <Titles>
    
                 <Title description="Combine Marketing Lists" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.CombineMarketingLists.Button.ToolTipTitle">
    
               <Titles>
    
                 <Title description="Combine Marketing Lists" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.MarketingEmail.Button.Alt">
    
               <Titles>
    
                 <Title description="Send Marketing Email" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.MarketingEmail.Button.LabelText">
    
               <Titles>
    
                 <Title description="Send Marketing Email" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.MarketingEmail.Button.ToolTipTitle">
    
               <Titles>
    
                 <Title description="Send Marketing Email" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.LabelText">
    
               <Titles>
    
                 <Title description="TEST Send Email" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.LabelText">
    
               <Titles>
    
                 <Title description="TEST Send Email" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.ToolTipDescription">
    
               <Titles>
    
                 <Title description="This button is used for testing and debugging only and its function may change at any time without notice; do not use for any live purpose." languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.ToolTipDescription">
    
               <Titles>
    
                 <Title description="This button is used for testing and debugging only and its function may change at any time without notice; do not use for any live purpose." languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.ToolTipTitle">
    
               <Titles>
    
                 <Title description="TESTING ONLY" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
             <LocLabel Id="dc.cc_offerout.TestSendEmail.Button.ToolTipTitle">
    
               <Titles>
    
                 <Title description="TESTING ONLY" languagecode="1033" />
    
               </Titles>
    
             </LocLabel>
    
           </LocLabels>
    
         </RibbonDiffXml>


  • G Kawinski Profile Picture
    380 on at

    I've been having the same problem, I cannot remove ribbon components.  Active ribbon components typically merge/replace when importing an entity, but this is no longer happening.  They appear to be behaving in an additive manner.  We recently upgraded to 9.1.0.1677

    I found a similar post.  The resolution did not work for me.  

    community.dynamics.com/.../310362

    Please keep us posted, we may be opening a case with MS soon.  

  • G Kawinski Profile Picture
    380 on at

    Looks like a product defect which is addressed in the next release.  From the Release Notes: "A ribbon command could not be deleted, resulting in failed DB updates"

    support.microsoft.com/.../service-update-18-for-microsoft-dynamics-365-9-1-0

  • Community Member Profile Picture
    on at

    I have a very similar problem, when editing a solution with the Ribbon Workbench I can see 3 custom buttons in the “Solution Elements” area however I cannot make any change because when publishing I get a validation error:

    Duplicate Button ID detected and removed 'maxis360.ApplicationRibbon.Button2.Button.CustomAction'

    Even if I don’t make any changes, just to publish, I get the same error.

    When I go to the Solution Elements and click the custom button with that ID it looks like it were a default button, meaning that it cannot be deleted, only customized or hidden. It’s very strange because I do know that it is a custom button.

    Then searching through the design surface I found another custom button that when I click on it I can see in its Properties panel that it has the same Button ID but strangely I do see it in the “Solution Elements” area, it’s like an orphan button.

    When checking the XML information, yes I can see 2 custom actions with the same ID. However when I try to remove the “orphan” custom button and re-publish I get the validation error again.

    I seems that the Ribbon Workbench is not able to fix that duplicity (that by the way I don’t know how it was possible to be published that duplicity of buttons). I wonder if it’s possible to “manually” fix that duplicity in the default solution.

  • Vishal Giri Profile Picture
    15 on at

    Guys I am also facing same issue, any fix / Workaround available?

  • Mo1 Profile Picture
    5 on at

    I have the same issue with Ribbon. Have used RW - Gives duplicate button Id issue.

    Exported the solution, changed the RibbonDiffXML element in customizations.xml to as it is shown after removing button and action from RW UI (on xml tab --> refresh)

    i.e.

    <RibbonDiffXml xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
      <CustomActions />
      <Templates>
        <RibbonTemplates Id="Mscrm.Templates" />
      </Templates>
      <CommandDefinitions />
      <RuleDefinitions>
        <TabDisplayRules />
        <DisplayRules />
        <EnableRules />
      </RuleDefinitions>
      <LocLabels />
    </RibbonDiffXml>
    

    Imported the solution, publish all customizations - brings the same issue back

    Completely removed RibbonDiffXml -> import -> publish all .. --> same issue.
    It is surprising this has no solution.

    This is Office 365 Dynamics CRM 9 (with latest updates)

    -- Mo

  • Gaz Powell Profile Picture
    30 on at

    Thanks for all your replies, I'm slightly relieved I'm not the only one!

    I have tried to replicate the problem on our own sandbox but that hasn't been affected yet - I will keep trying.

    I will raise an issue with Microsoft and let you know of any updates.

  • Community Member Profile Picture
    on at

    have the same issue. It appears just I've changed the icon of the button and published it second time. After that I'm getting the duplicate error and also can't find any workaround. Last time it happend I was using  RWB from the XRMTool plugin.

  • Gaz Powell Profile Picture
    30 on at

    Hi G Kawinski, thanks for finding that. Unfortunately I think we already have that service update applied - we're on 9.1.0.2055 and 9.1.0.2242.

    I will keep an eye on the release list though, that's very useful, thank you.

  • Rahul Katragadda Profile Picture
    15 on at

    Any Update on this.. We are having the same issue since a week and trying to see if there is any update from Microsoft..

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans