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 :
Finance | Project Operations, Human Resources, ...
Answered

Field validation on Data entity

(0) ShareShare
ReportReport
Posted on by 4,131

Hi,

Field validations could be enabled/disabled on data entity. Is this validation calling the table method validateFieldValue? 

And is it possible to enable or disable the system calling validateWrite as well?

Thanks,

I have the same question (0)
  • Verified answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    hi Yuji ,

    You can check the flow of  validation methods on  table in  below link. Tables validate methods gets called when you do import unless you are skipping those method through code. For example DataEntity.skipDataSourceValidateDelete(Boolean _skip) is going to skip turns validateDelete on or off for all data sources.

    docs.microsoft.com/.../validations-defaults-unmapped-fields

  • Verified answer
    MATTGUO Profile Picture
    22,349 Moderator on at

    Hi Yuji,

    Yes, validateFieldValue() is normally called by D365 kernel when Field validations.

    Maybe you will see the method validateField() .

    The method validateFieldValue() and the method validateField() are doing the same thing, they don’t have any differences, one based on fieldIds, the other based on field names.

    You can turns validateWrite on or off for all data sources with DataEntity.skipDataSourceValidateWrite(Boolean _skip).

  • maram fraij Profile Picture
    on at

    Is there a way to enforce data entity call table validate field in case of update (not import) instead of implementing  the validate field method at data entity level 

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    What do you mean by "update (not import)"? Do you mean that you want to validate some field only when updating, but not inserting? What's the background for this?

    In validateField you can add conditions and check something only if the record has RecId. But the method doesn't know if it's called by an entity execution or from a form.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans