Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Hide/Show Optionset dynamics 2015

(0) ShareShare
ReportReport
Posted on by 55

Hello,

I'am trying to make my personnalised optionset visible through JS.

     Xrm.Page.getControl("crm_Type").setVisible(true);
it's not showing the values of my optionset.,only the name of the optionset

  • Nando07 Profile Picture
    Nando07 55 on at
    RE: Hide/Show Optionset dynamics 2015

    Hello Torrado ,

    Thank you for your reply.

    I need to do it in JS, i have a lot of rules to check.

    I guess maybe its just a problem with my browser.

    Thank you

  • Verified answer
    Torrado Profile Picture
    Torrado 1,270 on at
    RE: Hide/Show Optionset dynamics 2015

    Hello Nando07,

    For Dynamics 2015, that is the correct function to hide/show Form fields. That function should not affect the list of values displayed, since it's just controlling the visibility of the field itself.

    You can also show/hide fields using Business Rule, what is the preferable option in case you want to apply just a simple logic.

    If you want to filter the options displayed under that OptionSet field you should use the following functions:

    • Xrm.Page.getControl(attributeName).addOption(option);
    • Xrm.Page.getControl(attributeName).removeOption(option);

    Hope this helps.

    Please mark the answer as verified if helpful.

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

News and Announcements

Announcing Category Subscriptions!

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

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans