I am having an issue deleting a button from an entity on ribbon workbench. Any help on how to resolve this would be helpful.
Here are the screenshots:
-Thank you in advance.
*This post is locked for comments

I am having an issue deleting a button from an entity on ribbon workbench. Any help on how to resolve this would be helpful.
Here are the screenshots:
-Thank you in advance.
*This post is locked for comments
Haven't seen this before, but try removing the CommandDefinition from the button and delete it afterwards.
If not... If the command is no longer in use, try delete the command and then delete the button.
Hope this helps.
I did remove the command definition and tried to delete the button. In the process of uploading the solution I got the error.
Just more information:
I noticed that the CommandCore still has a command that was deleted. But on the tab to the left, it says 0 Command.
Here is a screenshot:
Any help would be appreciated.
There is a tab in the Ribbon Workbench that says Xml. Can you go there, click Refresh button and paste it here. We may be able to see issue based on that.
Here's the XML:
<?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<CustomActions>
<CustomAction Id="new.new_workingsite.deadButton.CustomAction" Location="Mscrm.Form.new_workingsite.MainTab.Save.Controls._children" Sequence="43">
<CommandUIDefinition>
<Button Command="new_workingsiite.readOnlyCommand" Id="new_workingsite.deadButton" Image32by32="$webresource:new_/Images/DeadIcon.png" LabelText="$LocLabels:new_workingsite.deadButton.LabelText" Sequence="43" TemplateAlias="o1" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates" />
</Templates>
<CommandDefinitions />
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels>
<LocLabel Id="new_workingsite.deadButton.LabelText">
<Titles>
<Title description="DEAD" languagecode="1033" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>]
I am not sure if this will work, but you can try and replace the XML with the following (if you have no other customizations on the form:
<?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<CustomActions />
<Templates />
<CommandDefinitions />
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
If not, you will need to get rid of the button, command, so that when you refresh the XML tab, it will look something like that.
Funny enough! I tried that yesterday I ran into an error during the solution import that I couldn't figure out what was the cause:
Can you try exporting just this entity? Extract the entity, open the customizations.xml in Visual Studio and modify the RibbonXml portion of the entity. Then compress all the files again and try to re-import the entity again.
If you are uncertain about the Ribbon Xml, export another entity first and extract. Copy the RibbonXml from that entity, which should be empty, and paste it in this new entity.
This should work.
Hi!
When this sort of thing happens it's frustrating because it seems you can't delete the button because it's missing it's command. This situation can arrise when you first delete the command - then publish - then delete the button - then publish.
To resolve you'll need to:
1. Re-create the command new_workingsiite.readOnlyCommand (just leave it empty)
2. Wire up to your custom button
3. Publish
3. Reload the solution in the Ribbon Workbench
4. Delete the button and the command
5. Publish.
Hope the helps
Thanks for all the help and suggestions.
Luckily enough it's a new entity with very few customization. Instead of still trying to figure it out. I just recreated the entity.