Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Extend InventInventoryDimensionEntityFieldsMapping map to add new field mapping

(1) ShareShare
ReportReport
Posted on by 4
Hello, I am trying to extend InventInventoryTransferJournalEntryEntity entity and that entity uses InventInventoryDimensionEntityFieldsMapping map to map the inventory dimensions. I have a requirement now to add new fields to the data entity. These new fields are the generic inventory dimensions like InventDimension1, InventDimension2, etc that my client uses. I could not find the standard interface to this map to extend. What would be the better approach to extend this map? 
  • Suggested answer
    Martin Dráb Profile Picture
    234,615 Most Valuable Professional on at
    Extend InventInventoryDimensionEntityFieldsMapping map to add new field mapping
    It seems that you don't really want to extend the map; you want to extend the entity a map fields of the map (such as InventDimension1) to custom fields added to the entity. Nevertheless it isn't supported either.
     
    Instead, you'll need to extend code and get InventDimId for the dimension values by yourself. If you look at what the map does (in InventInventoryDimensionEntityFieldsMapping.resolveInventDim()), you'll see that it's nothing complicated. It simply assigns values of InventDim fields and calls InventDim::findOrCreate(). You can do that in your code too. The entity calls the logic in mapEntityToDataSource().
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    24,372 Super User 2025 Season 1 on at
    Extend InventInventoryDimensionEntityFieldsMapping map to add new field mapping
     
    maps are not extensible. so you cannot directly add fields or methods to it.
     
    Best regards,
    Mohamed Amine MAHMOUDI

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 171 Super User 2025 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 1

#3
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 127 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans