I am currently looking to disable bulk editing on all but a few entities, one of these being the "Campaign Response" entity.
To acheieve this I have done the following:
- Hide the OOTB edit button at a global level (As far as I know you can't edit OOTB ribbon buttons in this way)
- Create a new custom edit button at a global level (minus the SelectionCountRule node)
- For each entity which I need bulk edit on:
- Hide the custom edit ribbon button
- Create a new custom edit button with SelectionCountRule node.
Now this all works fine until I goto the activities sub grid on any entity. Due to the way I've approached this problem, there are now 2 edit buttons present on the activity form (one for the regular edit button and one for the campaign response's edit button).
I'm not sure how to fix this exactly but i have an idea which I'll need some help with:
- Delete the "bulk edit" edit buttons
- At a global level, add JavaScript in the custom edit button's selection rule
- JavaScript will obtain the selected entity's logical name (on all subgrids)
- If the entity is campaign response, enable (or append?) SelectionCountRule to the ribbon
I'm not sure if this is possible. I'm unsure mainly around what the JavaScript to ribbon enable rules allow for