Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Decimal Number Field Out-of-the-Box Validation Triggering before OnChange Event

(0) ShareShare
ReportReport
Posted on by 5

I am trying to add a custom error message to a form on a decimal field type. The validation should trigger when a user enters text value in the decimal number field.

The issue is that whenever the user enters a text value in the decimal number field type and removes focus from the field, an out-of-the-box error message icon is displayed next to the field. This seems to happen before the OnChange event of the field is fired. So, there is no way for me to override this validation. Any suggestion on how I can override this error message could be very helpful.

Below is a screenshot of the error with the range-bound decimal number field. 

pastedimage1612241193851v1.png

  • Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Decimal Number Field Out-of-the-Box Validation Triggering before OnChange Event

    Hi,

    As far as I know, you cannot do this in a supported manner.

  • gregmulaney Profile Picture
    gregmulaney 5 on at
    RE: Decimal Number Field Out-of-the-Box Validation Triggering before OnChange Event

    Hi Wahaj, Thank you for your response. Do you know what process triggers that validation. Is there anyway I can find out the event that this validation is being triggered on? What you are suggesting would be doable for a new entity. But for an entity with existing records, this path could be tricky. I am trying to avoid creating parallel fields as much as possible. Thank you.

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Decimal Number Field Out-of-the-Box Validation Triggering before OnChange Event

    Hi

    Thank you for your query.

    As far as I know, you cannot override this validation.

    An alternative is to use a Text field instead and do your custom validation and copy its value to a hidden decimal field (if you need it in decimal).

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans