Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Where 's the entry...
Finance forum

Where 's the entry for mapEntityToDataSource method in data entity?

Posted on by Microsoft Employee

Hi AX Experts, 

I'm working on adding a new field SkipCreateAutoCharge in the existing data entity PurchPurchaseOrderLineEntity. The requirement is in the entity we need logic for controlling the behavior. 

1. If the field SkipCreateAutoCharge is NOT specified, 

- In DMF: Default is Auto charges should NOT be applied - The skipCreateMarkup field on purchline should be Yes 

- In OData:/Excel: Default is Auto charges should be applied - The skipCreateMarkup field on purchline should be NoIf the field SkipCreateAutoCharges is specified

 

2. In both DMF and OData: No default - The SkipCreateMarkup field on purchline should be set to the value of the SkipCreateAutoCharges field on the entity

Setting the SkipCreateMarkup field on purchline record is done in the mapEntityToDataSource method on the entity and this is where the logic above should be applied.

 

I'm thinking that to add a field mapping to PurchLine,SkipCreateMarkup and add related logic in mapEntityToDataSource. But I don'w know where can debug into this method. Which scenario? 

 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Where 's the entry for mapEntityToDataSource method in data entity?

    I set breakpoints in PurchPurchaseOrderLineEntity all methods, and attach w3p or batch service, when click export/import button to trigger the operation, but no any response.  So can you show more details about which scenario can go into this method?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Where 's the entry for mapEntityToDataSource method in data entity?

    Hi Sukrut, I created a PO line export job for PurchPurchaseOrderLineEntity. But When debugging the export job progress, it didn't go into this method. So does it mean mapEntityToDataSource method is only processing the import logic (from data entity to purchline table)? And for mapDataSourceToEntity method, it's used to export data?? Please help confirm this.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans