web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 119 Super User 2026 Season 2

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 72

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans