web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Sreevalli Profile Picture
    3,256 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans