Disable fields in a Bulk Edit form


To disable a field in a Bulk edit form you would think editing the form’s OnLoad event would do the trick.

Something like

if (crmForm.FormType == 6)
{
  crmForm.new_myfield.style.display = "none";
}

This will NOT work.

No Javascript what soever is triggered in the bulk editform.

So to disable a field in a bulk edit form just enable the fields onchange event of the form.

Advertisements
Tagged with:
Posted in CRM 4
8 comments on “Disable fields in a Bulk Edit form
  1. WebMasterSam says:

    You’re wrong,

    JavaScript is triggered in all CRM forms, I do disable and hide fields in bulk edit forms and you have to do it the same way as in the normal CRM form.

  2. Kenny Vaes says:

    Strange. I have tried this multiple times and the OnLoad, OnChange events don’t seem to be triggered in a Bulk Edit Form.

    Even the CRM SDK is confirming this:

    Form and Field Events
    You can add scripts for the onLoad and OnSave events for the form and OnChange events for each field.

    Note Form and field events are disabled for the bulk edit form. The bulk edit form is displayed when multiple records in a list are edited.

    Are you using CRM 4 or CRM 3. I failed to mention this. But this post is regarding CRM 4. 🙂

  3. Sun says:

    Thanks for the heads up, all I needed to do is to check enable on change event on the field that I wish to disable on bulk edit.

    As it noted in the SDK:
    If you add code to the OnChange event for a field, the field will be disabled in the bulk edit form. The bulk edit form is displayed when multiple records in a list are edited.

    Do you know what rationale is behind this please? The CRM 3.0 way of achieving this makes more sense to me.

  4. Naresh says:

    Place the below code in onchange event of the field that you want to change .
    if(crmForm.FormType == 6)
    {
    crmForm.all.fieldname.disabled = false;
    }

    then export the entity cutomization and find the code below

    and change it to below

    save the customization and import it to crm and publish.

  5. Vinu says:

    I tried this in CRM 2011 with rol up 12,

    But for the Bulk edit, scripts are not working properly.
    Any thoughts?

  6. Vinu says:

    ” ”

    ” ”

    I tried this in CRM 2011 with rol up 12,

    But for the Bulk edit, scripts are not working properly.
    Any thoughts?

  7. Vinu says:

    “event name=”onsave” application=”false” active=”false” BehaviorInBulkEditForm=”Enabled”

    “event name=”onsave” application=”false” active=”false” BehaviorInBulkEditForm=”Enabled”

    I tried this in CRM 2011 with rol up 12,

    But for the Bulk edit, scripts are not working properly.
    Any thoughts?

  8. Many people living in South America eat the tubers as a fruit, together with honey and lemon juice, to add it to
    the fruit salad. When you receive your product, read the label carefully before opening.

    But in the 1500s manufacturers began refining sugar cane so that it could be more
    easily transported overseas, especially back to Europe.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: