Tuesday, November 10, 2009

Crm 4: Enabling all fields on Bulk Edit

A customer requested to be able to edit all fields on the bulk edit form.  A few things to note about this:

  • Your form javascript will not fire on the Bulk Edit page.  So if you have any validation, filter lookups, etc… they will not work.  (Unless you reattach the events of course)
  • All fields will be enable by this method, you will have to specifically exclude fields you wish to remain disabled.
  • Unsupported change.

Ok, lets get to the code:

  1. Open $CRmInstallDir\CRMWeb\_grid\cmds\dlg_BulkEdit.aspx
  2. Scroll down to around line 21
  3. There is a for loop that is is looping through the crmForm.all object
  4. Below line 23 (o = crmForm.all[i]) add the following code
    1. o.Disabled = false
    2. o.disabled = false
  5. You need both disabled flags to account for Data fields and lookups
  6. Save the page
  7. Test a bulk edit

Good Luck!