Notifications
Announcements
No record found.
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,
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
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).
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader