web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Validate in Data Entity or Staging table?

(0) ShareShare
ReportReport
Posted on by 124

Where do you usually validate when importing data using data management and why?

I have the same question (0)
  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    validations will apply in both "Source to Staging" and "Staging to Target steps."

  • xppdev Profile Picture
    124 on at

    It means that is it okay if I only put validation method in Staging table? What if I skip the staging table?

  • Suggested answer
    A.Prasanna Profile Picture
    8,223 on at

    Kindly Refer to this hope it will cover all what you need

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

  • Suggested answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    Staging tables are used just in certain cases (you can use data entities via OData, from code etc.), therefore that's not a good place for things like validations. Business logic for a data entity should be implemented inside the data entity.

  • xppdev Profile Picture
    124 on at

    Based from what I've read. Staging tables are generated to provide intermediary storage. This enables the framework to do high-volume parsing, transformation, and some validation.

    My initial thoughts on that was I should implement the validation in staging tables because they are intended to do high-volume stuff.

    Are there any performance issues if I import 10 thousand lines of an excel file using data entity validation?

    Thanks Martin!

  • Verified answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    A super-fast validation is useless if it's not called at all. And that would often be the case with your design.

    Staging tables are used just in some cases and they're populated by SSIS, which doesn't execute any X++ validations. You can execute some X++ code after importing the data, but I don't see any benefit of running validations there.

    The sole purpose of staging tables is to get data from files to F&O where you can work with the data. Business logic, including validations, is executed by data entities in the step, where data is validated and imported.

    Also, if you don't import data from files, no staging table is used any validation you put there would be bypassed.

  • xppdev Profile Picture
    124 on at

    That's really helpful. Let's say I use excel file as a source for importing data through data management. The best way to do is, write your validation code inside validateField or validateWrite in the data entity and leave the staging table methods alone.

    Based from your answers I can apply that to an example scenario wherein I have a custom table that contains old invoices and I'll implement a custom validation in Vendor Invoice Journal Line data entity where I check if the invoices already exists in the old invoices table. I'll probably put the logic in validateWrite or validateField for that data entity.

    Thanks again.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 439 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans