Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

HowTo Add Custom fields into a \Data Dictionary\Map

Posted on by 529

Hello All,

I need to add my custom field  Tables\JmgStamJournalTrans.AKS_CostCategoryId (EDT: RouteCostCategoryId) in to the \Data Dictionary\Maps\JmgStampTransMap so I can make jmgStamTransMap.AKS_CostCategoryId.

the reason is to bypass the my custom field from the Classes\JmgJobBundle\postTime() to the  Classes\JmgPostStandardSystem\postTime() using the jobTime Array  of type Records which is holding the jmgStampJournalTransTmp with the Category I need in order to Update CategoryHoursId and Price furthermore at  ProdJournalTrans and ProdRouteTrans tables.

I haven't work with Maps so I wonder if you guys can tell me if if possible to modify and how, without it messing it :)

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: HowTo Add Custom fields into a \Data Dictionary\Map

    Done Nikolaos, Thanks. Added the field and mapped.

    I still want to know about this buffeTable.TableId could you develop a little bit how would be if the field is not custom added to the map?

    thanks a lot for your help!

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: HowTo Add Custom fields into a \Data Dictionary\Map

    In the map definition in AOT you can add your custom field, and map it with the data source table(s) of the map. Once that's done, you can access it as jmgStampTransMap.AKS_CostCategoryId.

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: HowTo Add Custom fields into a \Data Dictionary\Map

    HI Nikolaos,

    My mistake the question is for AX 2012.

    is a way to do somthing like this (jmgStampTransMap.RecId).AKS_CostCategoryId ? or you saying by making a Select over those given value so a have the table row to work with

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: HowTo Add Custom fields into a \Data Dictionary\Map

    Is your question about Dynamics AX (2012) or D365FO?

    In AX2012 you can just add them by customizing the map.

    In D365FO you can't add custom fields to an AOT map.

    But in your code where you handle the map, you can instead fetch the actual underlying table (find it by mapBuffer.TableId and mapBuffer.RecId), and access your custom fields this way.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,246 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,041 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans