Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Option set field required - auto expands

(0) ShareShare
ReportReport
Posted on by

In CRM 2016 on premise version 8.0.1.97  - upon clicking a custom button we have an option set field set to required. This causes the option set to expand to show the list of potential values.  If no value is chosen upon save a notification error appears as expected. However the message cannot be read because the option set is expanded. Is there a way to close the option set or collapse it while required ? In 2011 it would just be highlighted with a first blank value

*This post is locked for comments

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Option set field required - auto expands

    Yes Ravi  you are correct , although the message is not visible under control  but its showing in the below right  corner , see the attached screenshot - 

    2018_2D00_12_2D00_17_5F00_11_2D00_07_2D00_38_5F00_optionset.png

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Option set field required - auto expands

    Hi,

    If I am not wrong, the same message appears in the save icon bottom right corner. So even if it is not visible, users will not be able to save the record and will be presented with the same error message near the save icon.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Option set field required - auto expands

    Hi R T,

    You can do following Workaround , setFocus wont be help in this case , seems setFocus internally calling  while set the control notification and expanded optionset fields.

    - Set Form Notification instead of control notification.

    OR 

    - Set the Optionset default value if its mandatory then , instead of setting null.

    2018_2D00_12_2D00_15_5F00_11_2D00_39_2D00_19_5F00_dd.png

    OR

    - Set optionset value using JS .

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at
    RE: Option set field required - auto expands

    Hi,

    After making Optionset field as mandatory, set the focus on next field so that option values will be collapsed

    Xrm.Page.getControl(AttributeName).setFocus();

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

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

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the 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 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans