Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

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

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,319 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,319 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans