web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

(0) ShareShare
ReportReport
Posted on by

Hi Team,

I was try to set the option set value through javascript on a bulk edit form, I enabled the javascript Onload function on the Bulk Edit, and written this line of code in my onload function  Xrm.Page.getAttribute("result").setValue(2);  This line gets executed set the value but at some point the CRM is changing this to null.I am wondering if this is a bulk edit limitation ? because the same works fine on a single record onload.

Thanks in Advance...!!!

Regards,

Awad.

*This post is locked for comments

I have the same question (0)
  • Sreenath Desaraju Profile Picture
    25 on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Hi Awad,

    I am also facing the same issue but not for bulk edit. I am just setting the option set value from parent record to child record using javascript on load. Unfortunately it's a global optionset. I have 5 values in the optionset. Out of which for the first 4, the values are setting up in the child record. Only for the 5th value which is added newly to the set, it is not getting set on the child record. Instead, null value is pushed. Can you please let me know if your issue is resolved. If so, what is the solution to mitigate it.

    Thanks in advance.

    Sreenath

  • awad Profile Picture
    on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Hi Ryan,

    The field name is "Result" and is of type Option Set. and it is a global option set and is used in multiple entities. I am try to set a default Option value to this option set when the users do a bulk edit of Assessment Result Records, as in most of the cases the option set value they select as "completed" option when entering the results using Bulk Edit form. And this way they will save time while entering the results.

    Thanks & Regards,

    Awad.

  • Ryan W Anderson Profile Picture
    on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Hey Awad, changing the value of BehaviorInBulkEdit is not supported or recommended. The documentation for <event> (FormXml) states For internal use only. Do not change this value.

    It's difficult to recommend an alternate approach without knowing what this field is, and the reason behind the business requirement to set the value when doing bulk edits.

  • awad Profile Picture
    on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    H Alagu,

    There is no business rule or workflow for it.

  • awad Profile Picture
    on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Hi Nithya,

    Yes i have enabled the onload script on bulk edit, bcoz i am trying to set the option set value in the onload function. 

    Thanks & Regards,

    Awad.

  • Alagunellaikumar Profile Picture
    6,212 on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Hi

    Check is there any business rule or workflow is triggered. Also Please refer below URL

    iancrm.wordpress.com/.../microsoft-dynamics-crm-and-bulk-editing-records

  • Nithya Gopinath Profile Picture
    17,078 on at
    RE: CRM 2016 Bulk Edit -Unable to Set Option Set Value through Javascript.

    Have you enabled the field event in the bulk edit form? Please refer the links below to enable it.

    community.dynamics.com/.../enable-scripts-on-bulk-edit-form-in-crm-2011

    msdn.microsoft.com/../gg334402.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans