Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Required field's validation message does not go away when switching the field's required level to recommended. Prevents me from saving.

Posted on by Microsoft Employee

When I trigger a Required Field's validation message by attempting to save when the field is empty, and then switch the field's Required Level to Recommended, the validation message that I triggered still persists and prevents me from saving. The steps I take are below:

1. I attempt to save the Opportunity entity while Billing Method is empty.

2630.Capture1.JPG

2. This triggers the field's validation message and prevents me from saving the Opportunity.

 5344.Capture2.JPG

3. I change the stage I am on, triggering my code which changes the Billing Method field's Required Level to Recommended. However, the validation asterisk still persists.

28130.Capture3.JPG

4. The validation message also still persists.

5344.Capture2.JPG

5. When I attempt to save at this point, the validation message prevents me from doing so, even with the Billing Method being set to Recommended.

Is there a way to clear the validation message of Required Fields? I assumed that setting a Required field to Recommended would do the trick, but my situation above illustrates otherwise.

Any assistance would be most appreciated.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Required field's validation message does not go away when switching the field's required level to recommended. Prevents me from saving.

    I think you should change your Field to Business Recommended at field level and then try to change it to required using code.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Required field's validation message does not go away when switching the field's required level to recommended. Prevents me from saving.

    Try see if the following JavaScript logic works to clear it:

    Xrm.Page.getControl(fieldname).clearNotification();

    It does make sense that the notification should change automatically when you change your fields from Required to Recommended, but it is possible that this is a MS bug (or by design).

    Try the above, and hopefully it will work.

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans