Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / DMF import with blank ...
Finance forum
Answered

DMF import with blank source file columns for mandatory and entity key fields

Posted on by 389
Hi,
 
I have 2 queries regarding the mandatory and entitykey fields during DMF import:
 
  • Do we always need to fill the mandatory fields defined at entity level in the source file coming from middleware. I tried setting value through code in postGetStagingData but got error The column ABC in entity XYZ has incorrect data. Please correct the data and try the import again. Can we not have a blank value in the file for mandatory field
  • I used the same method postGetStagingData  to also update a value in staging table for entity key value which was also blank in the source file but this succeeded. Here I have a doubt that why do we need to keep this column in the file when it has no value and we update the staging table field with code. I tried removing the column from file but then the import failed. Please help me understand why we need that column in file.
Thanks!!
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,570 Super User 2024 Season 2 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Hi Dev,

    Apologies for a late reply. I just found your question back. Have you solved your issue already?
    I'm not aware of all the details of your data entity. Entity key fields should always be part of the source file. 
  • Dev Profile Picture
    Dev 389 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Thanks Andre, please answer the second part of my question (mentioned below) and for the first part -  So the field which is mandatory at entity/staging level has to be filled in the source file and cannot be added later through the code?
     
    • I used the same method postGetStagingData  to also update a value in staging table for entity key value which was also blank in the source file but this succeeded. Here I have a doubt that why do we need to keep this column in the file when it has no value and we update the staging table field with code. I tried removing the column from file but then the import failed. Please help me understand why we need that column in file.
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,570 Super User 2024 Season 2 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Hi Dev,
     
    There are multiple levels where you can set fields to be mandatory. One is on the data entity, a second on the staging data, and also there can be mandatory fields on the target table. In case it is mandatory on the data entity or staging table, you need to provide a value as SSIS is used to fill the staging tables. In case you have only one default value, you can change the source to staging mapping and set a default value for this field. If the value depends on conditions, you can use your current coding and also set another default value. 

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,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans