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, ...
Suggested Answer

How to use mapEntityToDataSource method

(0) ShareShare
ReportReport
Posted on by 230
Hi Team,
 
Using PurchPurchaseOrderHeaderV2Entity i am importing the data.
 
PurchPurchaseOrderHeaderV2Entity.OrderVendorAccountNumber field data i am getting from custom parameter table instead of import file. So that i am writing the logic in entity postGetStagingData method and in mapping details i have set Auto default Yes of OrderVendorAccountNumber field.
 
Using above approach i am able to import the data.
 
But my client don't want to set Auto default Yes, is should handle through code.
 
For that i writing the my logic in mapEntityToDataSource method.
 
But i am getting below error.
Field 'Vendor account' must be filled in.
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    307,097 Super User 2026 Season 2 on at
    Hi,
     
    You might currently get the error due to the fact that the field for the vendor account is mandatory on the data entity an/or staging table. Using the method mapEntityToDataSource filling of the vendor account is done after inserting details in the staging table. So, ensure the data entity and staging table does not have this field set as mandatory. The auto default is then not required to set. 
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    As Andre suggested, this field is mandatory in staging. As making mandatory to no is not possible as it is standard. I think custom entity should be created in this scenario.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 366

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 360 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans