问题
What I'm Trying To Do
I've got a CRM entity (LocationSettings) that is displayed as an associated Sub Grid on another entity (Location). I want to add a button to the subgrid ribbon for the LocationSettings entity that will basically delete all LocationSettings for the Location the user is currently viewing.
Where I'm At
I'm using the Visual Ribbon Editor for CRM 2011, and I have been able to successfully create the button, and add it to the ribbon, but when I try to add a display rule to only allow the button to show up when the user is on the Location entity form, viewing the LocationSettings entity associated subgrid, I'm at a complete lost, and everything I try just results in the button not getting displayed.
My current best guess is to add a display rule with these values: Entity Name: location Applies To: PrimaryEntity Context: Form
Anyone know what I should be doing?
回答1:
So after digging around I finally found my issue. I was using an EntityRule display rule, when I needed to be using a FormEntityContextRule with location as my entity name. It works now. Hopefully this will help someone else down the road that manages to make the same dumb mistake...
来源:https://stackoverflow.com/questions/9195302/how-to-configure-crm-ribbon-xml-to-display-a-ribbon-button-for-an-entity-only-wh