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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

DMF Import Validations

(1) ShareShare
ReportReport
Posted on by 9
Hi all, 
When using data management framework to import data to a data entity, is it possible to apply an all-or-none type of validation so that if any of the records are invalid then you reject all of the records?  My users would prefer if they attempt to import 100 records from an excel file using DMF, if one record has a validation error then none of the records should be created.  I was reading the documentation about data entity validations here: 
 
From this, it appears we just have field and record level validations and I didn't see any good examples of how to apply a transaction scope to all of the records being imported so that I could accept or reject all of them as a set.  Is there any example in the system that creates a transaction scope around the process that copies the data to the target tables so that I can roll back all of the rows if any one of them are not valid?  Or does this type of design go against the spirit or concept of data entities in D365?  If we cannot do it at the time of writing to the target tables, is it possible to do this type of validation on the staging tables before any records begin writing to the target?  I am struggling to find good examples of either of these approaches and from my experience it seems the staging is getting written to at the same time as the target records.  Any examples or direction on a validation like this would be greatly appreciated!  Or confirmation that this is not a good design pattern and that I need to adjust my user's expectations on this is also appreciated!  
Categories:
I have the same question (1)
  • Sohaib Cheema Profile Picture
    47,948 User Group Leader on at
    DMF Import Validations
     
    it already does that, I have tested on the standard system using a simple entity named Customer Groups.
     
    I added two records to the excel, 1 good(having primary key), second bad record (missing primary key)

    As I tried executing my load, it goes to error which makes sense.
     
     
    none of the two newly added rows came in the system
     
    I have checked it with both (Import Now and Import via batch)
     
    if you look at the back-end classes, those show the transaction scope as well all exception handling
     
     
     

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 194

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
Sahan Hasitha Profile Picture

Sahan Hasitha 110

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans