How to configure CRM Ribbon xml to display a ribbon button for an Entity only when it is being viewed in the context of a particular parent entity

最后都变了- 提交于 2019-12-31 02:29:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!