Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting field object using javascript

(0) ShareShare
ReportReport
Posted on by

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
    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans