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 :
Customer experience | Sales, Customer Insights,...
Answered

Issue with Ribbon Workbench: "Empty OrGroup - Add at least 1 Rule" Error

(4) ShareShare
ReportReport
Posted on by 2,100
I'm facing an issue while customizing the ribbon in Dynamics 365 CRM using Ribbon Workbench. After adding a JavaScript function to hide an OOB button based on security roles, I attempted to publish the changes. However, I encountered the error:

"There are validation errors:
1. Empty OrGroup. Add at least 1 Rule.
heck the messages tab for the msdyn_workorderservicetask entity."



I refreshed the Ribbon Workbench to revert the changes and then customized the command again without altering anything else, but I still get the same error.
Has anyone experienced this or knows how to resolve it?

Thanks in advance for your help!
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,538 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening :) depending on your location!
    Hope you are well today.
     
    This error in Ribbon Workbench typically occurs when an OrGroup block is created without any valid conditions or rules. Here's how to resolve it:
    Steps to Fix the "Empty OrGroup - Add at least 1 Rule" Error:
    1. Review the Command Configuration:
      • Open the Ribbon Workbench and locate the command associated with the button you're customizing.
      • Check the OrGroup block within the command. Ensure that it contains at least one valid rule or condition.
    2. Add a Display Rule:
      • If the OrGroup is empty, add a simple display rule. For example:
        • Use a FormStateRule to check the form's state (e.g., Create or Update).
        • Use a ValueRule to check the value of a specific field.
      • This ensures the OrGroup is not empty and satisfies the validation requirements.
    3. Validate JavaScript Function:
      • Ensure the JavaScript function you added is correctly referenced in the command.
      • Verify that the function is published and accessible within the CRM environment.
    4. Remove Unnecessary Rules:
      • If there are redundant or conflicting rules in the OrGroup, remove them to simplify the configuration.
    5. Publish Changes:
      • After making the necessary updates, publish the changes in Ribbon Workbench.
      • Test the functionality to confirm the button behaves as expected.
    6. Backup and Retry:
      • If the issue persists, take a backup of the ribbon configuration and try recreating the command from scratch.
     
     
    Hope this helps!
  • Suggested answer
    Krishna Acharya Profile Picture
    123 on at

    Yes — this is a fairly common issue in Ribbon Workbench, and you're not alone!
    The error:
    "There are validation errors: Empty OrGroup. Add at least 1 Rule."
    means that one of your EnableRule or DisplayRule groups (likely tied to the command you edited) contains an empty OrGroup, which Ribbon Workbench doesn't allow.

    Here's how to fix it:

    1. Check Your Command Rules
    • Open the Command you attached your JavaScript to in Ribbon Workbench.
    • Look at any Enable Rules or Display Rules you've added.
    • If you used an "OrGroup" (i.e., multiple rules inside an OR block), and it's empty — that’s what causes the error.
    2. Fix or Remove the Empty OrGroup
    • Find the OrGroup that’s empty and either:
      • Add a valid rule inside it (e.g., a ValueRule, CustomRule, or PrivilegeRule), or
      • Delete the OrGroup if it's not needed.
    3. Check Related Entities (like msdyn_workorderservicetask)
    • The error message refers to msdyn_workorderservicetask, so check if you have any commands or rules on that entity’s ribbon too — you might have added an empty rule group unintentionally.
    Why This Happens:
    Creating an OR rule group in Ribbon Workbench adds the structure without any rules by default. If no rules are added, it results in an invalid setup, causing the publish to fail.

    I used AI to help craft rephrases this response and share some useful tips for your Dynamics 365 challenge.
    If its helpful to you please Mark as verified
    Thanks,
    Krishna
  • Verified answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello Inkey Solutions,
     

    Yes, this "Empty 'OrGroup'. Add at least 1 Rule." error in Ribbon Workbench is a fairly common one, and it usually indicates an issue with how display rules or enable rules are configured for your ribbon elements (buttons, tabs, groups). Even if you feel you haven't explicitly created an empty OrGroup, it can sometimes arise due to how Ribbon Workbench manages the underlying XML.

    Here's a breakdown of the likely causes and how to resolve this:

    Understanding the Error:

    The error message means that within the XML definition of your ribbon customizations for the msdyn_workorderservicetask entity, there's an <Or> element (which groups multiple rules) that doesn't contain any <Rule> elements within it. Every OrGroup needs at least one rule to define the conditions under which the associated ribbon element should be displayed or enabled.

    Troubleshooting Steps:


    1. Carefully Inspect the Messages Tab:

       

      • Crucial Step: As the error message explicitly states, check the "Messages" tab within Ribbon Workbench. This tab often provides more specific details about where the empty OrGroup is located within your customizations for the msdyn_workorderservicetask entity. It might point to a specific button, command, or display rule.

    2. Review Your Display Rules and Enable Rules:

       

      • Expand All Elements: In Ribbon Workbench, expand all the elements related to the msdyn_workorderservicetask entity: Buttons, Tabs, Groups, Commands, Display Rules, and Enable Rules.

      • Look for Incomplete Configurations: Carefully examine the configurations of your display rules and enable rules, especially the ones you've recently modified or that are associated with the button you're trying to hide. Look for:

        • Display rules or enable rules that have an <Or> element but no child <Rule> elements.
        • Rules that might have been partially created or deleted incorrectly, leaving behind an empty OrGroup.  

    3. Examine the Command Associated with Your Button:

      • Select the button you are trying to hide.
      • In the "Command" section, review the associated command.
      • Check the "Display Rules" and "Enable Rules" linked to this command. This is a likely place where the empty OrGroup might exist.

      •  

    4. Check Default Display Rules (Even if You Didn't Intend to Modify Them):

       

      • Sometimes, when you customize a button, Ribbon Workbench might interact with the default display rules. Inspect the default display rules associated with the button to see if an empty OrGroup has inadvertently been created or modified.

    5. Look for Orphaned or Incomplete Rules:

       

      • If you were in the process of creating or modifying a rule and didn't complete it properly, it might have left behind an empty OrGroup.

    6. Try Deleting and Re-Creating Your Display Rule (Carefully):

       

      • If you suspect the issue is with the display rule you created, try deleting it entirely.
      • Important: Before deleting, make a note of its properties and the logic you were trying to implement.
      • After deleting, re-create the display rule from scratch, ensuring you add at least one <Rule> to the <Or> group.

    7. Examine Customizations in the Solution:

      • If the issue persists, export your solution as an unmanaged solution.
      • Unzip the solution file.
      • Open the customizations.xml file.
      • Search for <Or> elements within the section related to the msdyn_workorderservicetask entity. Look for any <Or> tags that don't have any <Rule> tags inside them. You can then manually edit the XML to remove the empty OrGroup.
      • Caution: Directly editing the customizations.xml file is an advanced step and should be done with extreme care. Ensure you have a backup of your solution before attempting this.

      •  

    8. Revert to a Previous Version (If Possible):

       

      • If you have a recent backup of your solution or environment, consider reverting to that state before your recent ribbon customizations.

      •  

    Why Reverting and Re-Customizing Might Still Show the Error:

    If you reverted the changes in Ribbon Workbench but are still seeing the error after re-customizing, it's possible that:

    • The empty OrGroup wasn't fully reverted. Sometimes, Ribbon Workbench might not cleanly undo certain changes.
    • You are inadvertently recreating the empty OrGroup during your second attempt. Be extra careful when adding or modifying rules.

    •  

    In summary, the key to resolving this error is to thoroughly investigate the "Messages" tab in Ribbon Workbench. It will likely pinpoint the specific display rule or command containing the empty OrGroup. Then, carefully review and correct the configuration of that element. If you're still stuck, exporting the solution and examining the customizations.xml file (with caution) can provide further insights.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans