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

I have the same question (0)
  • Suggested answer
    Sreevalli Profile Picture
    3,264 on at

    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();

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    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 .

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    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

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

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans