Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

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

  • 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
    awad 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.

  • 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
    awad 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
    awad 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
    Alagunellaikumar 6,210 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
    Nithya Gopinath 17,074 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans