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 Extend InventSumDateEngine Class for custom fields in Physical on hand inv report

(1) ShareShare
ReportReport
Posted on by 4
Hi
 
i need to extend inventsumdateengine class to add customfields in inventdimphys report , to insert data in InventSumDateTransReport tmp table , which is tmp table for this report and dp class is inventdimphys 
 
can anyone help which method to extends in which class so that i can add logic for custom fields in InventSumDateTransReport table to insert in report
I have the same question (0)
  • Martin Dráb Profile Picture
    239,452 Most Valuable Professional on at
    What code you should write, and whether it's possible at all, depends on your specific requirements.
     
    In general, the records are inserted in mergeRecords() table. You can extend neither the insert_recordset statement nor the final insert to inventSumDateTransReport, but you can iterate inventSumDateTransReport records after that and populate your custom fields, if you're able to determine their values. If you need something more, such us extending the insert_recordset statement, you'll need to create an extensibility request.
     
    I'm assuming that the question is about F&O, that's why I moved it from the AX forum and gave you the answer above. If you meant something else in Dynamics AX, please give us more details (and I'll move it back to the AX forum).
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,803 Super User 2026 Season 1 on at
    Hi @Sachin,
     
    I suggest you make an extension on the table InventSumDateTransReport and add your logic in initFromInventSumDateTrans or initFromInventDim method.
    for e.g.
    [ExtensionOf(tableStr(InventSumDateTransReport))]
    final class InventSumDateTransReport_Extension
    {
        public void initFromInventSumDateTrans(InventSumDateTrans _inventSumDateTrans, InventDim _inventDim)
        {
            next initFromInventSumDateTrans(_inventSumDateTrans, _inventDim);
            // your code here
        }
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Martin Dráb Profile Picture
    239,452 Most Valuable Professional on at
    Aha, there is one more case. My answer covers the scenario when isInventSumDateEngineDenormalizeInventSumDateTransToggleEnabled is false; Mohamed's answer the other case.
  • Sachin Mittal Profile Picture
    4 on at
    Hi @mohamad , I have done this code but its not working , fields are blank in report
    [ExtensionOf(tableStr(InventSumDateTransReport))]
    final class InventSumDateTransReport_Extension
    {
        public void initFromInventSumDateTrans(InventSumDateTrans _inventSumDateTrans, InventDim _inventDim)
        {
            next initFromInventSumDateTrans(_inventSumDateTrans, _inventDim);
            // your code here
            InventTable invent = InventTable::find(this.ItemId);
    
              
            this.PackTypeDesc = ItemPackType::find(invent.ItemPackTypeId).Description;
            this.PackSizeDesc = PackSizeMaster::find(invent.PackSizeId).Description;
    
                    ttsbegin;
                    this.insert();
                    ttscommit;
        }
    
    }
     
  • Sachin Mittal Profile Picture
    4 on at
    HI @MArtin , in my case i have debugged and found that  isInventSumDateEngineDenormalizeInventSumDateTransToggleEnabled is true ;in my case , can you suggest any approach now , to insert data in report custom fields it would be very helpful for me , if not can we say that this report can be customized ???
     
     
  • Martin Dráb Profile Picture
    239,452 Most Valuable Professional on at
    Use the debugger to collect more information. First of all, does your code gets called at all? As I mentioned, it depends on configuration.
     
    Also, calling insert() is a bug that would duplicate records. The standard code saves records (otherwise the report would always be empty) and you're doing it once more. The purpose of initFrom methods is initializing field values, not saving.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,803 Super User 2026 Season 1 on at
    Hi @Sachin,
     
    You can't put the insert() instruction in this method.
    You must remove it from this method extension to avoid double insertion !
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Sachin Mittal Profile Picture
    4 on at
    HI @Mohamed 
    i have removed insert still data is not coming in tmp table
  • Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi Sachin,
     
    When you say it's not working, did u debug your method and see if it gets called? If yes, then did you check by debugging if the new pack fields you added are being filled or are they empty?
  • Sachin Mittal Profile Picture
    4 on at
    HI @Layan 

    i mean . yes i have debugged its not hitting this method on running the report 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 622

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 553 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans