Disabled fields in Bulk Edit Form – CRM 2011
Hi,
In CRM, We can edit multiple records (i.e., Bulk Edit) at a time. To do bulk edits we have to follow below steps
- Select multiple records from the view (or) Associated view
- Click on “Edit” button on the Ribbon
– In CRM 4.0 and older UR’s of CRM 2011, once you get the Bulk Edit CRM Form, you would notice couple of fields on the form is in disabled state and you wonder why?
Reason:-
- Fields with “onchange” event will be in disabled state on Bulk Edit Form in CRM 4.0 and older roll up’s of CRM 2011.
- With latest UR’s of CRM 2011, by default fields are in enabled state however the scripts associated to fields onchange event are disabled.
- This is because for multiple records, CRM won’t be able to trigger the OnChange event and take the defined action in OnChange Jscript
- In simple words, By Default Form and field events are disabled for the bulk edit form.
To enable a field (event) in Bulk Edit Form:-
We can enable the field onchange event by changing entity customization
Steps:-
- Export the entity as a solution
- Open “customizations.xml” file using visual studio
- Navigate to <events> node of the field and set “BehaviorInBulkEditForm” to “Enabled”
- Import back the solution (See below for the node)
- <events><eventname=“onchange” application=“false” active=“false” attribute=“{your_attributename}” BehaviorInBulkEditForm=“Enabled“>
- “BehaviorInBulkEditForm” has below 3 options
- Enabled – If you use this value, the field is enabled. Additionally, the code for the event is run when the event is called.
- Disabled – If you use this value, the field is disabled.
- EnabledButNoRender – If you use this value, the field is enabled. However, the code for the event is not run when the event is called.
- Refer this useful link (KB) on Bulk Edithttp://support.microsoft.com/kb/949941
Hope it Helps 🙂
I have added a dummy function to my javascript and added that to the onchange event for a field but it is still enabled in bulk edit. We are running UR12 on premise. Maybe something changed since this article was written?
With latest UR’s of CRM 2011, by default fields are in enabled state, however the scripts associated to fields onchange event are disabled.
We can enable the event by adding BehaviorInBulkEditForm=”Enabled” property as mentioned in the article
Thank you, Rajeev. This proved to be very helpful.