Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Getting field object using javascript

Posted on by Microsoft Employee

Hi, im trying to create multiselect option set in dynamics crm 2016 following this link:

burnignorance.com/.../add-a-multiselect-optionset-to-ms-dynamics

From this below line, what value should be returned ?

OSet= window.parent.document.all.lnkt_impactlevel; //get OptionSet field object
OSetValue= window.parent.document.all.lnkt_impactlevelvalue;     //get MultiLineTextBox field object

In my case, it's returning [object HTMLDivElement], is it correct ?

*This post is locked for comments

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Javascript Multiple Select Optionset Error

    Hi Fikri

    Multiple select optionsets were introduced with CRM 9.0 (2016 is 8.X). See following article: docs.microsoft.com/.../multi-select-picklist

    From the code you pasted above, you are calling the DOM, which is not supported by MS Dynamics CRM and it could be very likely why this is failing.  (msdn.microsoft.com/.../gg328350.aspx)

    I would suggest considering a different (supported) approach:

    - if you are using CRM Online - upgrade to the latest build

    - If you are CRM OnPremise - where 9.0 is not available (probably the next major build will be) - you could try to create a custom IFrame, add it to the form and have some custom logic there that mimics a multi select OptionSet that you could map in the background to  a CRM N:N / N:1 relationship.

    Hope this helps,

    Radu

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