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

I have the same question (0)
  • Suggested answer
    Torrado Profile Picture
    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.

  • Nando07 Profile Picture
    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

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 107 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 89

#3
#ManoVerse Profile Picture

#ManoVerse 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans