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, ...
Unanswered

customize standard InventAging report

(1) ShareShare
ReportReport
Posted on by 123
Hi there, here I am going to add three columns in the InventAging report as vendor code, vendor name and vendor group
But I am unable to fetch the required values here through these code.
Can you please help me out?
 
 
  • Martin Dráb Profile Picture
    240,902 Most Valuable Professional on at
    Please tell us what you mean by "I am unable to fetch the required values here through these code". What did you find when you debugged your code?
  • M_R Profile Picture
    123 on at
    found this while debugging



  • Martin Dráb Profile Picture
    240,902 Most Valuable Professional on at
    Why not? Are you saying that you know how to run code in debugger but otherwise you have no idea how to use it, such as how to see whether your code got called and whether variables have the expected values?
  • Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi @M_R,
     
    Do you mean that the values for the custom fields weren't filled correctly? Can you provide more details about the issue?
  • M_R Profile Picture
    123 on at
    I am going to add three columns in the InventAging report as vendor code, vendor name and vendor group. 
    But not getting the values of vendor code, vendor name and vendor group through this code
     
    [ExtensionOf(classstr(InventAgingDP))]
    final class ABCInventAgingDP_Extension
    {
        public void processReport()
        {
            next processReport();
            InventAgingTmp  inventAgingTmpabc = this.getinventoryAgingTmp();

            ttsbegin;
            while select forupdate inventAgingTmpabc
                      
                InventTable inventTable = InventTable::find(inventAgingTmpabc.ItemId);
                inventAgingTmpabc.AccountNum =inventTable.PrimaryVendorId;
                inventAgingTmpabc.PackagingGroupId = inventTable.PackagingGroupId;

                //VendTable vendTable;
                VendTable vendTable = VendTable::find(inventTable.PrimaryVendorId);
                inventAgingTmpabc.Name = vendTable.name();
                inventAgingTmpabc.VendGroup =vendTable.VendGroup;
                inventAgingTmpabc.update();

                //if (InventTable)
                //{
                //inventAgingTmpabc.AccountNum = inventTable.PrimaryVendorId;
                //VendTable = VendTable::find(inventAgingTmpabc.AccountNum);
                //if (VendTable)
                //{
                //inventAgingTmpabc.Name = vendTable.name();
                //inventAgingTmpabc.VendGroup = vendTable.VendGroup;
                //}
                //inventAgingTmpabc.PackagingGroupId = InventTable::find(inventAgingTmpabc.ItemId).PackagingGroupId;
           

            }
            ttscommit;
                
          }
    }
  • Martin Dráb Profile Picture
    240,902 Most Valuable Professional on at
    You really need to use the debugger to find out where your code fails. Please tell us if you don't know how to do it; we can help you.
     
    Start by putting a breakpoint at the line with insert() and check if the fields are populated as expected. If not, look at the other variables. For example, maybe you already failed to find the VendTable record, or maybe even the InventTable record. When you know which values are wrong, continue your debugging to find out why. If you can't resolve the problem on your own, share all the information you collected with us.
     
    As you see, just trying to guess what's wrong is not a good approach. You made no progress with that, so maybe you should start taking our advice seriously.
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Your code seems okay but to say if it is working, as everyone suggested, you need to debug it. You need to understand if extension is getting triggered, then check what values the code is returning like let's say the vendor group or name. Then you can have some more idea and understand exact issue.
  • M_R Profile Picture
    123 on at
    while debugging it is showing the values, but when we print the report it is showing blank as no values are coming.
  • Martin Dráb Profile Picture
    240,902 Most Valuable Professional on at
    A problem isolation is still your main problem. That a reports shows no data may be caused by the report itself, not the data. Test the report with hard-coded values (e.g. added in insert() to verify that it can ever show values of your custom fields. If not, you need to fix the report, not the data provider.
     
    By the way, I think you should put your code to an extension of InventAgingReportLines.findOrCreate(). It's the most logical place and performance will be much better (because you won't need to process all lines again).
  • Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi M_R,
     
    Is the issue resolved? Did you try Martin's suggestion " Test it with hard coded values?"
     
     

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 August Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
CU10121822-0 Profile Picture

CU10121822-0 376

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 47 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans